Fixed last change.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@691 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
aa1f1ac3c2
commit
f5af65aecc
1 changed files with 23 additions and 22 deletions
|
|
@ -190,32 +190,14 @@ SWIG_Cast_Str (void *source, char *source_type, void **ptr, char *_t)
|
||||||
static unsigned long swig_tag = 0;
|
static unsigned long swig_tag = 0;
|
||||||
|
|
||||||
SWIGSTATIC SCM
|
SWIGSTATIC SCM
|
||||||
SWIG_Guile_MakePtr (void *ptr, SwigPtrType *type)
|
SWIG_Guile_MakePtr (void *ptr, _swig_type_info *type)
|
||||||
{
|
{
|
||||||
if (ptr==NULL) return SCM_EOL;
|
if (ptr==NULL) return SCM_EOL;
|
||||||
SCM_RETURN_NEWSMOB((((unsigned long)type->tag << 16) | swig_tag),
|
SCM_RETURN_NEWSMOB((((unsigned long)type->ptrtype->tag << 16) | swig_tag),
|
||||||
ptr);
|
ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TRANSITIONAL */
|
static int
|
||||||
SWIGSTATIC SCM
|
|
||||||
SWIG_Guile_MakePtr_Str (void *ptr, char *typestring, char *prettytypestring)
|
|
||||||
{
|
|
||||||
SwigPtrType *type = SWIG_GetPtrType(typestring);
|
|
||||||
if (type == NULL) {
|
|
||||||
SWIG_RegisterMapping(typestring, NULL, NULL);
|
|
||||||
type = SWIG_GetPtrType(typestring);
|
|
||||||
if (type == NULL) {
|
|
||||||
fprintf(stderr, "SWIG_Guile_MakePtr_Str: bailing out\n");
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (type->prettyname == NULL) type->prettyname = prettytypestring;
|
|
||||||
return SWIG_Guile_MakePtr(ptr, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TRANSITIONAL */
|
|
||||||
SWIGSTATIC int
|
|
||||||
SWIG_Guile_GetPtr_Str (SCM s, void **result, char *typestring)
|
SWIG_Guile_GetPtr_Str (SCM s, void **result, char *typestring)
|
||||||
{
|
{
|
||||||
if (SCM_NULLP(s)) {
|
if (SCM_NULLP(s)) {
|
||||||
|
|
@ -234,8 +216,9 @@ SWIG_Guile_GetPtr_Str (SCM s, void **result, char *typestring)
|
||||||
|
|
||||||
/* Return 0 if successful. */
|
/* Return 0 if successful. */
|
||||||
SWIGSTATIC int
|
SWIGSTATIC int
|
||||||
SWIG_Guile_GetPtr(SCM s, void **result, SwigPtrType *type)
|
SWIG_Guile_GetPtr(SCM s, void **result, _swig_type_info *type)
|
||||||
{
|
{
|
||||||
|
/* FIXME: Use native typechecking w/o string-compares */
|
||||||
return SWIG_Guile_GetPtr_Str(s, result, type->name);
|
return SWIG_Guile_GetPtr_Str(s, result, type->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -273,6 +256,24 @@ SWIG_Guile_Init (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Convert datatype table */
|
||||||
|
|
||||||
|
SWIGSTATIC
|
||||||
|
void SWIG_Guile_RegisterTypes(_swig_type_info **table)
|
||||||
|
{
|
||||||
|
for (; *table; table++) {
|
||||||
|
_swig_type_info *type = *table;
|
||||||
|
char *origname = type->name;
|
||||||
|
/* Register datatype itself */
|
||||||
|
SWIG_RegisterMapping(origname, 0, 0);
|
||||||
|
/* Store pointer to actual type */
|
||||||
|
type->ptrtype = SWIG_GetPtrType(origname);
|
||||||
|
/* Register compatible types */
|
||||||
|
for (type++; type->name; type++)
|
||||||
|
SWIG_RegisterMapping(origname, type->name, type->converter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue