*** empty log message ***

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@26 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 1999-11-20 14:03:13 +00:00
commit 05640f1cab
3 changed files with 13 additions and 2 deletions

View file

@ -613,19 +613,25 @@ void DohDelitem(DOH *obj, int index) {
/* Set an item in an object */
void DohInsertitem(DOH *obj, int index, DOH *value) {
DOH *value_obj;
int no = 0;
DohBase *b = (DohBase *) obj;
DohError(DOH_CALLS,"DohInsertitem %x, %d, %x\n",obj,index, value);
if (DohIsSequence(obj)) {
if (!DohCheck(value)) {
DohError(DOH_CONVERSION,"Unknown object %x being converted to a string in Insertitem.\n", value);
value_obj = NewString(value);
no = 1;
Incref(value_obj);
} else {
value_obj = value;
}
if (b->objinfo->doh_sequence->doh_insitem) {
(b->objinfo->doh_sequence->doh_insitem)(obj,index,value_obj);
return;
}
if (no) {
Delete(value_obj);
}
return;
}
if (DohCheck(obj)) {
DohError(DOH_UNSUPPORTED,"No insitem method defined for type '%s'\n", b->objinfo->objname);

View file

@ -183,6 +183,7 @@ void DohObjFree(DOH *ptr) {
Fragment *f;
extern int doh_debug_level;
if (!DohCheck(ptr)) {
DohError(DOH_MEMORY,"DohObjFree. %x not a DOH object!\n", ptr);
return; /* Oh well. Guess we're leaky */
@ -246,7 +247,8 @@ void DohFree(void *ptr) {
int size;
size = *((int *) (cptr - 8));
free(cptr-8);
_DohMemoryCurrent -= (size+8);
_DohMemoryCurrent = _DohMemoryCurrent - (size+8);
/* printf("Free %x %d\n", ptr, size);*/
}
/* -----------------------------------------------------------------------------

View file

@ -25,6 +25,9 @@
#ifndef _DOH_H
#define _DOH_H
#include <stdio.h>
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif