*** 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:
Dave Beazley 1999-08-12 23:28:26 +00:00
commit d48387d9f0
3 changed files with 42 additions and 4 deletions

View file

@ -9,7 +9,7 @@
# Set your C++ compiler here. g++ works on most machines,
# but you might have to change it depending on your installation.
#
CC = gcc -O2
CC = cc
prefix = /usr/sandbox
# Comment out the following line if you're on an SGI or don't have ranlib!

View file

@ -412,7 +412,7 @@ DOH *DohFirst(DOH *obj) {
if (b->objinfo->doh_mapping->doh_firstkey) {
return DohGetattr(obj,(b->objinfo->doh_mapping->doh_firstkey)(obj));
}
}
}
if (DohCheck(obj)) {
DohError(DOH_UNSUPPORTED,"No firstkey method defined for type '%s'\n", b->objinfo->objname);
} 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
* ----------------------------------------------------------------------------- */

View file

@ -51,8 +51,8 @@ typedef struct {
int (*doh_setitem)(DOH *obj, int index, DOH *value);
int (*doh_delitem)(DOH *obj, int index);
int (*doh_insitem)(DOH *obj, int index, DOH *value);
DOH *(*doh_first)(DOH *obj);
DOH *(*doh_next)(DOH *obj);
DOH *(*doh_firstitem)(DOH *obj);
DOH *(*doh_nextitem)(DOH *obj);
} DohSequenceMethods;
/* File methods */
@ -136,6 +136,8 @@ extern DOH *DohFirst(DOH *obj);
extern DOH *DohNext(DOH *obj);
extern DOH *DohFirstkey(DOH *obj);
extern DOH *DohNextkey(DOH *obj);
extern DOH *DohFirstitem(DOH *obj);
extern DOH *DohNextitem(DOH *obj);
extern void *DohData(DOH *obj);
extern int DohGetline(DOH *obj);
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 GetInt DohGetInt
#define GetDouble DohGetDouble
#define Firstitem DohFirstitem
#define Nextitem DohNextitem
/* #define Scanf DohScanf
#define vScanf DohvScanf*/