Minor fixes needed to support pointer.i library.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e9240d69cf
commit
0d3b41b8f6
1 changed files with 20 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ SWIGEXPORT(int) SWIG_ConvertPtr(Tcl_Interp *, Tcl_Obj *, void **, _swig_type_inf
|
|||
SWIGEXPORT(void) SWIG_MakePtr(char *, void *, _swig_type_info *);
|
||||
SWIGEXPORT(Tcl_Obj *) SWIG_NewPointerObj(void *, _swig_type_info *);
|
||||
SWIGEXPORT(int) SWIG_GetArgs(Tcl_Interp *, int, Tcl_Obj *CONST [], const char *, ...);
|
||||
SWIGEXPORT(char *) SWIG_PointerTypeFromString(char *c);
|
||||
|
||||
#else
|
||||
static _swig_type_info *swig_types = 0;
|
||||
|
|
@ -163,6 +164,7 @@ SWIG_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, _swig_type_in
|
|||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGSTATICRUNTIME(int)
|
||||
SWIG_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, _swig_type_info *ty)
|
||||
|
|
@ -170,6 +172,24 @@ SWIG_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, _swig_type_info *ty
|
|||
return SWIG_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty);
|
||||
}
|
||||
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGSTATICRUNTIME(char *)
|
||||
SWIG_PointerTypeFromString(char *c) {
|
||||
char d;
|
||||
/* Pointer values must start with leading underscore */
|
||||
if (*c != '_') {
|
||||
return 0;
|
||||
}
|
||||
c++;
|
||||
/* Extract hex value from pointer */
|
||||
while (d = *c) {
|
||||
if (!(((d >= '0') && (d <= '9')) || ((d >= 'a') && (d <= 'f')))) break;
|
||||
c++;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/* Take a pointer and convert it to a string */
|
||||
SWIGSTATICRUNTIME(void)
|
||||
SWIG_MakePtr(char *c, void *ptr, _swig_type_info *ty) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue