*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@15 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
17f6c1597b
commit
d48387d9f0
3 changed files with 42 additions and 4 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
# Set your C++ compiler here. g++ works on most machines,
|
# Set your C++ compiler here. g++ works on most machines,
|
||||||
# but you might have to change it depending on your installation.
|
# but you might have to change it depending on your installation.
|
||||||
#
|
#
|
||||||
CC = gcc -O2
|
CC = cc
|
||||||
prefix = /usr/sandbox
|
prefix = /usr/sandbox
|
||||||
|
|
||||||
# Comment out the following line if you're on an SGI or don't have ranlib!
|
# Comment out the following line if you're on an SGI or don't have ranlib!
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ DOH *DohFirst(DOH *obj) {
|
||||||
if (b->objinfo->doh_mapping->doh_firstkey) {
|
if (b->objinfo->doh_mapping->doh_firstkey) {
|
||||||
return DohGetattr(obj,(b->objinfo->doh_mapping->doh_firstkey)(obj));
|
return DohGetattr(obj,(b->objinfo->doh_mapping->doh_firstkey)(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (DohCheck(obj)) {
|
if (DohCheck(obj)) {
|
||||||
DohError(DOH_UNSUPPORTED,"No firstkey method defined for type '%s'\n", b->objinfo->objname);
|
DohError(DOH_UNSUPPORTED,"No firstkey method defined for type '%s'\n", b->objinfo->objname);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -594,6 +594,40 @@ void DohInsertitem(DOH *obj, int index, DOH *value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Delete an item from an object */
|
||||||
|
DOH *DohFirstitem(DOH *obj) {
|
||||||
|
DohBase *b = (DohBase *) obj;
|
||||||
|
DohError(DOH_CALLS,"DohFirstitem %x\n");
|
||||||
|
if (DohIsSequence(obj)) {
|
||||||
|
if (b->objinfo->doh_sequence->doh_firstitem) {
|
||||||
|
return (b->objinfo->doh_sequence->doh_firstitem)(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (DohCheck(obj)) {
|
||||||
|
DohError(DOH_UNSUPPORTED,"No firstitem method defined for type '%s'\n", b->objinfo->objname);
|
||||||
|
} else {
|
||||||
|
DohError(DOH_UNKNOWN,"Unknown object %x passed to DohFirstitem\n",obj);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Delete an item from an object */
|
||||||
|
DOH *DohNextitem(DOH *obj) {
|
||||||
|
DohBase *b = (DohBase *) obj;
|
||||||
|
DohError(DOH_CALLS,"DohNextitem %x\n");
|
||||||
|
if (DohIsSequence(obj)) {
|
||||||
|
if (b->objinfo->doh_sequence->doh_nextitem) {
|
||||||
|
return (b->objinfo->doh_sequence->doh_nextitem)(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (DohCheck(obj)) {
|
||||||
|
DohError(DOH_UNSUPPORTED,"No nextitem method defined for type '%s'\n", b->objinfo->objname);
|
||||||
|
} else {
|
||||||
|
DohError(DOH_UNKNOWN,"Unknown object %x passed to DohNextitem\n",obj);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* File methods
|
* File methods
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ typedef struct {
|
||||||
int (*doh_setitem)(DOH *obj, int index, DOH *value);
|
int (*doh_setitem)(DOH *obj, int index, DOH *value);
|
||||||
int (*doh_delitem)(DOH *obj, int index);
|
int (*doh_delitem)(DOH *obj, int index);
|
||||||
int (*doh_insitem)(DOH *obj, int index, DOH *value);
|
int (*doh_insitem)(DOH *obj, int index, DOH *value);
|
||||||
DOH *(*doh_first)(DOH *obj);
|
DOH *(*doh_firstitem)(DOH *obj);
|
||||||
DOH *(*doh_next)(DOH *obj);
|
DOH *(*doh_nextitem)(DOH *obj);
|
||||||
} DohSequenceMethods;
|
} DohSequenceMethods;
|
||||||
|
|
||||||
/* File methods */
|
/* File methods */
|
||||||
|
|
@ -136,6 +136,8 @@ extern DOH *DohFirst(DOH *obj);
|
||||||
extern DOH *DohNext(DOH *obj);
|
extern DOH *DohNext(DOH *obj);
|
||||||
extern DOH *DohFirstkey(DOH *obj);
|
extern DOH *DohFirstkey(DOH *obj);
|
||||||
extern DOH *DohNextkey(DOH *obj);
|
extern DOH *DohNextkey(DOH *obj);
|
||||||
|
extern DOH *DohFirstitem(DOH *obj);
|
||||||
|
extern DOH *DohNextitem(DOH *obj);
|
||||||
extern void *DohData(DOH *obj);
|
extern void *DohData(DOH *obj);
|
||||||
extern int DohGetline(DOH *obj);
|
extern int DohGetline(DOH *obj);
|
||||||
extern void DohSetline(DOH *obj, int line);
|
extern void DohSetline(DOH *obj, int line);
|
||||||
|
|
@ -203,6 +205,8 @@ extern int DohvPrintf(DOH *obj, char *format, va_list ap);
|
||||||
#define vPrintf DohvPrintf
|
#define vPrintf DohvPrintf
|
||||||
#define GetInt DohGetInt
|
#define GetInt DohGetInt
|
||||||
#define GetDouble DohGetDouble
|
#define GetDouble DohGetDouble
|
||||||
|
#define Firstitem DohFirstitem
|
||||||
|
#define Nextitem DohNextitem
|
||||||
|
|
||||||
/* #define Scanf DohScanf
|
/* #define Scanf DohScanf
|
||||||
#define vScanf DohvScanf*/
|
#define vScanf DohvScanf*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue