Removed ability to share type information by C linking
All type sharing happens through a global variable in the target language. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
02cffc8047
commit
75e462baa8
50 changed files with 204 additions and 1162 deletions
|
|
@ -10,7 +10,6 @@
|
|||
#include "chicken.h"
|
||||
%}
|
||||
|
||||
%insert(runtime) "precommon.swg"
|
||||
%insert(runtime) "common.swg"; // Common type-checking code
|
||||
%insert(runtime) "chickenrun.swg"; // CHICKEN run-time code
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* chicken/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Chicken_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Chicken_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Chicken_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Chicken_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Chicken_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Chicken_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Chicken_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Chicken_TypeClientData
|
||||
#define SWIG_PackData SWIG_Chicken_PackData
|
||||
#define SWIG_UnpackData SWIG_Chicken_UnpackData
|
||||
|
||||
|
|
@ -25,13 +25,7 @@
|
|||
# define SWIGEXPORT(a) a
|
||||
#endif
|
||||
|
||||
#define SWIGIMPORT(a) a
|
||||
|
||||
#ifdef SWIG_GLOBAL
|
||||
# define SWIGRUNTIME(a) SWIGEXPORT(a)
|
||||
#else
|
||||
# define SWIGRUNTIME(a) static a
|
||||
#endif
|
||||
#define SWIGRUNTIME(x) static x
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -50,27 +44,11 @@ typedef struct swig_type_info {
|
|||
struct swig_type_info *prev;
|
||||
} swig_type_info;
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
|
||||
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
|
||||
SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
|
||||
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
|
||||
SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
|
||||
SWIGIMPORT(const char *) SWIG_TypePrettyName(const swig_type_info *);
|
||||
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
|
||||
SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
|
||||
SWIGIMPORT(char *) SWIG_PackData(char *, void *, int);
|
||||
SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int);
|
||||
SWIGIMPORT(void) SWIG_PropagateClientData(swig_type_info *type);
|
||||
|
||||
#else
|
||||
|
||||
static swig_type_info *swig_type_list = 0;
|
||||
static swig_type_info **swig_type_list_handle = &swig_type_list;
|
||||
|
||||
/* Register a type mapping with the type-checking */
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
static swig_type_info *
|
||||
SWIG_TypeRegister(swig_type_info *ti) {
|
||||
swig_type_info *tc, *head, *ret, *next;
|
||||
/* Check to see if this type has already been registered */
|
||||
|
|
@ -110,7 +88,7 @@ SWIG_TypeRegister(swig_type_info *ti) {
|
|||
}
|
||||
|
||||
/* Check the typename */
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
static swig_type_info *
|
||||
SWIG_TypeCheck(char *c, swig_type_info *ty) {
|
||||
swig_type_info *s;
|
||||
if (!ty) return 0; /* Void pointer */
|
||||
|
|
@ -136,14 +114,14 @@ SWIG_TypeCheck(char *c, swig_type_info *ty) {
|
|||
}
|
||||
|
||||
/* Cast a pointer up an inheritance hierarchy */
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_TypeCast(swig_type_info *ty, void *ptr) {
|
||||
if ((!ty) || (!ty->converter)) return ptr;
|
||||
return (*ty->converter)(ptr);
|
||||
}
|
||||
|
||||
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
static swig_type_info *
|
||||
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
||||
swig_type_info *lastty = ty;
|
||||
if (!ty || !ty->dcast) return ty;
|
||||
|
|
@ -155,7 +133,7 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
|||
}
|
||||
|
||||
/* Return the name associated with this type */
|
||||
SWIGRUNTIME(const char *)
|
||||
static inline const char *
|
||||
SWIG_TypeName(const swig_type_info *ty) {
|
||||
return ty->name;
|
||||
}
|
||||
|
|
@ -163,7 +141,7 @@ SWIG_TypeName(const swig_type_info *ty) {
|
|||
/* Return the pretty name associated with this type,
|
||||
that is an unmangled type name in a form presentable to the user.
|
||||
*/
|
||||
SWIGRUNTIME(const char *)
|
||||
static const char *
|
||||
SWIG_TypePrettyName(const swig_type_info *type) {
|
||||
/* The "str" field contains the equivalent pretty names of the
|
||||
type, separated by vertical-bar characters. We choose
|
||||
|
|
@ -218,7 +196,7 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|||
|
||||
|
||||
/* Search for a swig_type_info structure */
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
static swig_type_info *
|
||||
SWIG_TypeQuery(const char *name) {
|
||||
swig_type_info *ty = *swig_type_list_handle;
|
||||
while (ty) {
|
||||
|
|
@ -230,7 +208,7 @@ SWIG_TypeQuery(const char *name) {
|
|||
}
|
||||
|
||||
/* Set the clientdata field for a type */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
||||
swig_type_info *tc, *equiv;
|
||||
if (ti->clientdata == clientdata) return;
|
||||
|
|
@ -250,7 +228,7 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|||
}
|
||||
|
||||
/* Pack binary data into a string */
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
||||
static char hex[17] = "0123456789abcdef";
|
||||
unsigned char *u = (unsigned char *) ptr;
|
||||
|
|
@ -265,7 +243,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|||
}
|
||||
|
||||
/* Unpack binary data from a string */
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_UnpackData(char *c, void *ptr, size_t sz) {
|
||||
register unsigned char uu = 0;
|
||||
register int d;
|
||||
|
|
@ -292,7 +270,7 @@ SWIG_UnpackData(char *c, void *ptr, size_t sz) {
|
|||
* of equivalent types. It is like calling
|
||||
* SWIG_TypeClientData(type, clientdata) a second time.
|
||||
*/
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_PropagateClientData(swig_type_info *type) {
|
||||
swig_type_info *equiv = type->next;
|
||||
swig_type_info *tc;
|
||||
|
|
@ -310,8 +288,6 @@ SWIG_PropagateClientData(swig_type_info *type) {
|
|||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@
|
|||
static int _swig_init = 0;
|
||||
|
||||
if (!_swig_init) {
|
||||
SWIG_Guile_Init();
|
||||
SWIG_Guile_RegisterTypes(swig_types, swig_types_initial);
|
||||
_swig_init = 1;
|
||||
}
|
||||
|
||||
SWIG_Guile_Init();
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -36,14 +36,6 @@ extern "C" {
|
|||
(char *) FUNC_NAME, (char *) msg, \
|
||||
SCM_EOL, SCM_BOOL_F); else
|
||||
|
||||
#if defined(SWIG_NOINCLUDE)
|
||||
# define SWIGSTATIC
|
||||
#elif defined(SWIG_GLOBAL)
|
||||
# define SWIGSTATIC
|
||||
#else
|
||||
# define SWIGSTATIC static
|
||||
#endif
|
||||
|
||||
#define GH_NOT_PASSED SCM_UNDEFINED
|
||||
#define GH_UNSPECIFIED SCM_UNSPECIFIED
|
||||
|
||||
|
|
@ -121,7 +113,7 @@ typedef struct swig_type_info {
|
|||
int dummy;
|
||||
} swig_type_info;
|
||||
|
||||
SWIGSTATIC void
|
||||
static void
|
||||
SWIG_Guile_RegisterTypes (swig_type_info **table,
|
||||
swig_type_info **init);
|
||||
|
||||
|
|
@ -131,17 +123,17 @@ SWIG_Guile_RegisterTypes (swig_type_info **table,
|
|||
typically used to cast pointers from derived classes to base classes in
|
||||
C++). */
|
||||
|
||||
SWIGSTATIC void
|
||||
static void
|
||||
SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||
swig_converter_func cast);
|
||||
|
||||
|
||||
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
||||
SWIGSTATIC swig_type_info *
|
||||
static swig_type_info *
|
||||
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr);
|
||||
|
||||
/* Register SWIG smobs with Guile. */
|
||||
SWIGSTATIC void
|
||||
static void
|
||||
SWIG_Guile_Init();
|
||||
|
||||
/* Initialization function for this SWIG module; actually renamed by a
|
||||
|
|
@ -150,21 +142,21 @@ SWIG_Guile_Init();
|
|||
|
||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
||||
return nonzero; on success, return 0. */
|
||||
SWIGSTATIC int
|
||||
static int
|
||||
SWIG_Guile_GetPtr (SCM s, void **result, swig_type_info *type);
|
||||
|
||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
||||
signal a wrong-type-arg error for the given argument number. */
|
||||
SWIGSTATIC void *
|
||||
static void *
|
||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||
int argnum, const char *func_name);
|
||||
|
||||
/* Make a smob from a pointer and typeinfo. */
|
||||
SWIGSTATIC SCM
|
||||
static SCM
|
||||
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type);
|
||||
|
||||
/* Get arguments from an argument list */
|
||||
SWIGSTATIC int
|
||||
static int
|
||||
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||
int reqargs, int optargs,
|
||||
const char *procname);
|
||||
|
|
@ -175,11 +167,6 @@ typedef SCM (*swig_guile_proc)();
|
|||
}
|
||||
#endif
|
||||
|
||||
/* guiledec.swg ends here */
|
||||
|
||||
#ifndef SWIG_NOINCLUDE
|
||||
/* SWIG pointer structure */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -197,19 +184,21 @@ struct SwigPtrType {
|
|||
struct SwigCast *cast; /* List of compatible types */
|
||||
};
|
||||
|
||||
/* Some variables */
|
||||
|
||||
static int SwigPtrMax = 64; /* Max entries that can be held */
|
||||
/* (may be adjusted dynamically) */
|
||||
static int SwigPtrN = 0; /* Current number of entries */
|
||||
static int SwigPtrSort = 0; /* Status flag indicating sort */
|
||||
|
||||
/* Pointer table */
|
||||
static SwigPtrType *SwigPtrList = 0; /* Table containing types and
|
||||
struct swig_module_info {
|
||||
int PtrMax;/* Max entries that can be held *//* (may be adjusted dynamically) */
|
||||
int PtrN;/* Current number of entries */
|
||||
int PtrSort;/* Status flag indicating sort */
|
||||
SwigPtrType *PtrList; /* Table containing types and
|
||||
equivalences; items will only
|
||||
be appended */
|
||||
static size_t *SwigPtrTbl = 0; /* Sorted indirect table; items will
|
||||
be inserted */
|
||||
size_t *PtrTbl;/* Sorted indirect table; items will be inserted */
|
||||
|
||||
unsigned long swig_tag;
|
||||
|
||||
};
|
||||
|
||||
static struct swig_module_info SwigModuleLocal = {64,0,0,0,0,0};
|
||||
static struct swig_module_info *SwigModule = &SwigModuleLocal;
|
||||
|
||||
/* Sort comparison function */
|
||||
static int
|
||||
|
|
@ -217,34 +206,34 @@ swigsort (const void *data1, const void *data2)
|
|||
{
|
||||
size_t index1 = * (size_t *) data1;
|
||||
size_t index2 = * (size_t *) data2;
|
||||
return strcmp(SwigPtrList[index1].name, SwigPtrList[index2].name);
|
||||
return strcmp(SwigModule->PtrList[index1].name, SwigModule->PtrList[index2].name);
|
||||
}
|
||||
|
||||
/* Register a new datatype with the type-checker */
|
||||
SWIGSTATIC size_t
|
||||
static size_t
|
||||
SWIG_RegisterType (const char *type, const char *prettyname)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Allocate the pointer table if necessary */
|
||||
if (!SwigPtrList) {
|
||||
SwigPtrList = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType));
|
||||
SwigPtrTbl = (size_t *) malloc(SwigPtrMax*sizeof(size_t));
|
||||
SwigPtrN = 0;
|
||||
if (!SwigModule->PtrList) {
|
||||
SwigModule->PtrList = (SwigPtrType *) malloc(SwigModule->PtrMax*sizeof(SwigPtrType));
|
||||
SwigModule->PtrTbl = (size_t *) malloc(SwigModule->PtrMax*sizeof(size_t));
|
||||
SwigModule->PtrN = 0;
|
||||
}
|
||||
/* Grow the table if necessary */
|
||||
if (SwigPtrN >= SwigPtrMax) {
|
||||
SwigPtrMax = 2*SwigPtrMax;
|
||||
SwigPtrList = (SwigPtrType *) realloc((char *) SwigPtrList,
|
||||
SwigPtrMax*sizeof(SwigPtrType));
|
||||
SwigPtrTbl = (size_t *) realloc((char *) SwigPtrTbl,
|
||||
SwigPtrMax*sizeof(size_t));
|
||||
if (SwigModule->PtrN >= SwigModule->PtrMax) {
|
||||
SwigModule->PtrMax = 2*SwigModule->PtrMax;
|
||||
SwigModule->PtrList = (SwigPtrType *) realloc((char *) SwigModule->PtrList,
|
||||
SwigModule->PtrMax*sizeof(SwigPtrType));
|
||||
SwigModule->PtrTbl = (size_t *) realloc((char *) SwigModule->PtrTbl,
|
||||
SwigModule->PtrMax*sizeof(size_t));
|
||||
}
|
||||
/* Look up type */
|
||||
for (i = 0; i < SwigPtrN; i++)
|
||||
if (strcmp(SwigPtrList[i].name,type) == 0) {
|
||||
for (i = 0; i < SwigModule->PtrN; i++)
|
||||
if (strcmp(SwigModule->PtrList[i].name,type) == 0) {
|
||||
if (prettyname!=NULL)
|
||||
SwigPtrList[i].prettyname = prettyname;
|
||||
SwigModule->PtrList[i].prettyname = prettyname;
|
||||
return i;
|
||||
}
|
||||
{
|
||||
|
|
@ -253,20 +242,20 @@ SWIG_RegisterType (const char *type, const char *prettyname)
|
|||
#if 0
|
||||
fprintf(stderr, "New type: %s\n", type);
|
||||
#endif
|
||||
tag = SwigPtrTbl[SwigPtrN] = SwigPtrN;
|
||||
t = &SwigPtrList[tag];
|
||||
tag = SwigModule->PtrTbl[SwigModule->PtrN] = SwigModule->PtrN;
|
||||
t = &SwigModule->PtrList[tag];
|
||||
t->name = type;
|
||||
t->prettyname = prettyname;
|
||||
t->tag = SwigPtrN;
|
||||
t->tag = SwigModule->PtrN;
|
||||
t->cast = NULL;
|
||||
SwigPtrN++;
|
||||
SwigPtrSort = 0;
|
||||
SwigModule->PtrN++;
|
||||
SwigModule->PtrSort = 0;
|
||||
return tag;
|
||||
}
|
||||
}
|
||||
|
||||
/* Register two data types and their mapping with the type checker. */
|
||||
SWIGSTATIC void
|
||||
static void
|
||||
SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
||||
swig_converter_func cast)
|
||||
{
|
||||
|
|
@ -276,7 +265,7 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
|||
size_t t1 = SWIG_RegisterType(newtype, NULL);
|
||||
struct SwigCast *c;
|
||||
/* Check for existing cast */
|
||||
for (c = SwigPtrList[t].cast; c && c->type!=t1; c=c->next) /* nothing */;
|
||||
for (c = SwigModule->PtrList[t].cast; c && c->type!=t1; c=c->next) /* nothing */;
|
||||
if (c) {
|
||||
if (cast) c->cast = cast;
|
||||
}
|
||||
|
|
@ -284,8 +273,8 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
|||
c = (struct SwigCast *) malloc(sizeof(struct SwigCast));
|
||||
c->type = t1;
|
||||
c->cast = cast;
|
||||
c->next = SwigPtrList[t].cast;
|
||||
SwigPtrList[t].cast = c;
|
||||
c->next = SwigModule->PtrList[t].cast;
|
||||
SwigModule->PtrList[t].cast = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -295,9 +284,9 @@ SWIG_RegisterMapping (const char *origtype, const char *newtype,
|
|||
static void
|
||||
SWIG_SortTable (void)
|
||||
{
|
||||
qsort ((void *) SwigPtrTbl, SwigPtrN, sizeof(size_t), swigsort);
|
||||
qsort ((void *) SwigModule->PtrTbl, SwigModule->PtrN, sizeof(size_t), swigsort);
|
||||
/* Indicate that everything is sorted */
|
||||
SwigPtrSort = 1;
|
||||
SwigModule->PtrSort = 1;
|
||||
}
|
||||
|
||||
/* Look up pointer-type entry in table */
|
||||
|
|
@ -307,16 +296,16 @@ swigcmp (const void *key, const void *data)
|
|||
{
|
||||
char *k = (char *) key;
|
||||
size_t index = *(size_t *)data;
|
||||
return strcmp(k, SwigPtrList[index].name);
|
||||
return strcmp(k, SwigModule->PtrList[index].name);
|
||||
}
|
||||
|
||||
static SwigPtrType *
|
||||
SWIG_GetPtrType (const char *_t)
|
||||
{
|
||||
size_t *result;
|
||||
if (!SwigPtrSort) SWIG_SortTable();
|
||||
result = (size_t *) bsearch(_t, SwigPtrTbl, SwigPtrN, sizeof(size_t), swigcmp);
|
||||
if (result!=NULL) return SwigPtrList+*result;
|
||||
if (!SwigModule->PtrSort) SWIG_SortTable();
|
||||
result = (size_t *) bsearch(_t, SwigModule->PtrTbl, SwigModule->PtrN, sizeof(size_t), swigcmp);
|
||||
if (result!=NULL) return SwigModule->PtrList+*result;
|
||||
else return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -331,7 +320,7 @@ SWIG_Cast (void *source, size_t source_type,
|
|||
mapping table to figure out whether or not we can accept this
|
||||
datatype. */
|
||||
struct SwigCast *c;
|
||||
for (c = SwigPtrList[dest_type].cast;
|
||||
for (c = SwigModule->PtrList[dest_type].cast;
|
||||
c && c->type!=source_type; c = c->next) /* nothing */;
|
||||
if (c) {
|
||||
/* Get pointer value. */
|
||||
|
|
@ -351,7 +340,7 @@ SWIG_Cast (void *source, size_t source_type,
|
|||
}
|
||||
|
||||
/* Dynamic pointer casting. Down an inheritance hierarchy */
|
||||
SWIGSTATIC swig_type_info *
|
||||
static swig_type_info *
|
||||
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
|
||||
{
|
||||
swig_type_info *lastty = ty;
|
||||
|
|
@ -365,18 +354,16 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
|
|||
|
||||
/* Function for getting a pointer value */
|
||||
|
||||
static unsigned long swig_tag = 0;
|
||||
|
||||
SWIGSTATIC SCM
|
||||
static SCM
|
||||
SWIG_Guile_MakePtr (void *ptr, swig_type_info *type)
|
||||
{
|
||||
if (ptr==NULL) return SCM_EOL;
|
||||
SCM_RETURN_NEWSMOB((((unsigned long)type->tag << 16) | swig_tag),
|
||||
SCM_RETURN_NEWSMOB((((unsigned long)type->tag << 16) | SwigModule->swig_tag),
|
||||
ptr);
|
||||
}
|
||||
|
||||
/* Return 0 if successful. */
|
||||
SWIGSTATIC int
|
||||
static int
|
||||
SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
||||
{
|
||||
if (SCM_NULLP(s)) {
|
||||
|
|
@ -384,7 +371,7 @@ SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
|||
return 0;
|
||||
}
|
||||
else if (SCM_NIMP(s)
|
||||
&& (unsigned long) SCM_TYP16(s) == swig_tag) {
|
||||
&& (unsigned long) SCM_TYP16(s) == SwigModule->swig_tag) {
|
||||
if (type)
|
||||
return !SWIG_Cast((void *) SCM_CDR(s),
|
||||
(long) SCM_CAR(s) >> 16,
|
||||
|
|
@ -397,7 +384,7 @@ SWIG_Guile_GetPtr(SCM s, void **result, swig_type_info *type)
|
|||
return 1;
|
||||
}
|
||||
|
||||
SWIGSTATIC void *
|
||||
static void *
|
||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||
int argnum, const char *func_name)
|
||||
{
|
||||
|
|
@ -415,9 +402,9 @@ static int
|
|||
print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
|
||||
{
|
||||
scm_puts((char *) "#<swig ", port);
|
||||
if (SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname != NULL)
|
||||
scm_puts((char*) SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname, port);
|
||||
else scm_puts((char*) SwigPtrList[(long) SCM_CAR(swig_smob) >> 16].name, port);
|
||||
if (SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname != NULL)
|
||||
scm_puts((char*) SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].prettyname, port);
|
||||
else scm_puts((char*) SwigModule->PtrList[(long) SCM_CAR(swig_smob) >> 16].name, port);
|
||||
scm_puts((char *) " ", port);
|
||||
scm_intprint((long) SCM_CDR(swig_smob), 16, port);
|
||||
scm_puts((char *) ">", port);
|
||||
|
|
@ -434,18 +421,27 @@ equalp_swig (SCM A, SCM B)
|
|||
else return SCM_BOOL_F;
|
||||
}
|
||||
|
||||
SWIGSTATIC void
|
||||
static void
|
||||
SWIG_Guile_Init (void)
|
||||
{
|
||||
if (swig_tag == 0) {
|
||||
swig_tag = scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL,
|
||||
SCM pointer;
|
||||
|
||||
pointer = gh_lookup("swig_runtime_data_type_pointer");
|
||||
if (pointer == SCM_UNDEFINED) {
|
||||
pointer = gh_ulong2scm((unsigned long)SwigModule);
|
||||
gh_define("swig_runtime_data_type_pointer", pointer);
|
||||
if (SwigModule->swig_tag == 0) {
|
||||
SwigModule->swig_tag = scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL,
|
||||
print_swig, equalp_swig);
|
||||
}
|
||||
} else {
|
||||
SwigModule = (struct swig_module_info *) gh_scm2ulong(pointer);
|
||||
}
|
||||
}
|
||||
|
||||
/* Convert datatype table */
|
||||
|
||||
SWIGSTATIC
|
||||
static
|
||||
void SWIG_Guile_RegisterTypes(swig_type_info **table,
|
||||
swig_type_info **init)
|
||||
{
|
||||
|
|
@ -460,7 +456,7 @@ void SWIG_Guile_RegisterTypes(swig_type_info **table,
|
|||
}
|
||||
}
|
||||
|
||||
SWIGSTATIC int
|
||||
static int
|
||||
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||
int reqargs, int optargs,
|
||||
const char *procname)
|
||||
|
|
@ -489,7 +485,3 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* guile.swg ends here */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#define SWIGGUILE_SCM
|
||||
|
||||
%runtime "precommon.swg"
|
||||
%runtime "common.swg"
|
||||
|
||||
%runtime "guile_scm_run.swg"
|
||||
|
|
|
|||
|
|
@ -48,42 +48,7 @@ typedef struct swig_guile_clientdata {
|
|||
(char *) FUNC_NAME, (char *) msg, \
|
||||
SCM_EOL, SCM_BOOL_F); else
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
/* Interface helper function */
|
||||
SWIGIMPORT(char *) SWIG_Guile_scm2newstr(SCM str, size_t *len);
|
||||
|
||||
/* Register SWIG smobs with Guile. */
|
||||
SWIGIMPORT(void) SWIG_Guile_Init();
|
||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
||||
return nonzero; on success, return 0. */
|
||||
SWIGIMPORT(int) SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags);
|
||||
/* Get a pointer value from a smob. If there is a type-mismatch,
|
||||
signal a wrong-type-arg error for the given argument number. */
|
||||
SWIGIMPORT(void *) SWIG_Guile_MustGetPtr(SCM s, swig_type_info *type, int argnum, int flags, const char *func_name);
|
||||
/* Make a smob from a pointer and typeinfo. */
|
||||
SWIGIMPORT(SCM) SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner);
|
||||
/* Get arguments from an argument list */
|
||||
SWIGIMPORT(int) SWIG_Guile_GetArgs(SCM *dest, SCM rest, int reqargs, int optargs, const char *procname);
|
||||
/* Make a pointer object non-collectable */
|
||||
SWIGIMPORT(void)
|
||||
SWIG_Guile_MarkPointerNoncollectable(SCM s);
|
||||
/* Mark a pointer object destroyed */
|
||||
SWIGIMPORT(void)
|
||||
SWIG_Guile_MarkPointerDestroyed(SCM s);
|
||||
/* Access type and address of a pointer object. */
|
||||
SWIGIMPORT(unsigned long)
|
||||
SWIG_Guile_PointerAddress(SCM object);
|
||||
SWIGIMPORT(swig_type_info *)
|
||||
SWIG_Guile_PointerType(SCM object);
|
||||
SWIGIMPORT(int)
|
||||
SWIG_Guile_IsPointer(SCM object);
|
||||
SWIGIMPORT(int)
|
||||
SWIG_Guile_IsPointerOfType(SCM object, swig_type_info *type);
|
||||
|
||||
#else
|
||||
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_Guile_scm2newstr(SCM str, size_t *len) {
|
||||
#define FUNC_NAME "SWIG_Guile_scm2newstr"
|
||||
char *ret;
|
||||
|
|
@ -114,7 +79,7 @@ static SCM swig_symbol = SCM_EOL;
|
|||
( SCM_NNULLP(x) && SCM_INSTANCEP(x) && SCM_NFALSEP(scm_slot_exists_p(x, swig_symbol)) \
|
||||
? scm_slot_ref(x, swig_symbol) : (x) )
|
||||
|
||||
SWIGRUNTIME(SCM)
|
||||
static SCM
|
||||
SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
|
||||
{
|
||||
if (ptr == NULL)
|
||||
|
|
@ -143,7 +108,7 @@ SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(unsigned long)
|
||||
static unsigned long
|
||||
SWIG_Guile_PointerAddress(SCM object)
|
||||
{
|
||||
SCM smob = SWIG_Guile_GetSmob(object);
|
||||
|
|
@ -156,7 +121,7 @@ SWIG_Guile_PointerAddress(SCM object)
|
|||
else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object);
|
||||
}
|
||||
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
static swig_type_info *
|
||||
SWIG_Guile_PointerType(SCM object)
|
||||
{
|
||||
SCM smob = SWIG_Guile_GetSmob(object);
|
||||
|
|
@ -170,7 +135,7 @@ SWIG_Guile_PointerType(SCM object)
|
|||
}
|
||||
|
||||
/* Return 0 if successful. */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
||||
{
|
||||
swig_type_info *cast;
|
||||
|
|
@ -200,7 +165,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
|||
return 1;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||
int argnum, int flags, const char *func_name)
|
||||
{
|
||||
|
|
@ -212,7 +177,7 @@ SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
|||
return result;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static inline int
|
||||
SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
||||
{
|
||||
void *result;
|
||||
|
|
@ -223,14 +188,14 @@ SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
|||
else return 1;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static inline int
|
||||
SWIG_Guile_IsPointer (SCM s)
|
||||
{
|
||||
return SWIG_Guile_IsPointerOfType (s, NULL);
|
||||
}
|
||||
|
||||
/* Mark a pointer object non-collectable */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Guile_MarkPointerNoncollectable(SCM s)
|
||||
{
|
||||
SCM smob = SWIG_Guile_GetSmob(s);
|
||||
|
|
@ -243,7 +208,7 @@ SWIG_Guile_MarkPointerNoncollectable(SCM s)
|
|||
}
|
||||
|
||||
/* Mark a pointer object destroyed */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Guile_MarkPointerDestroyed(SCM s)
|
||||
{
|
||||
SCM smob = SWIG_Guile_GetSmob(s);
|
||||
|
|
@ -339,7 +304,7 @@ ensure_smob_tag(SCM swig_module,
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Guile_Init ()
|
||||
{
|
||||
SCM swig_module;
|
||||
|
|
@ -386,7 +351,7 @@ SWIG_Guile_Init ()
|
|||
#endif
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
||||
int reqargs, int optargs,
|
||||
const char *procname)
|
||||
|
|
@ -412,8 +377,6 @@ SWIG_Guile_GetArgs (SCM *dest, SCM rest,
|
|||
return num_args_passed;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* guile/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Guile_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Guile_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Guile_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Guile_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Guile_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Guile_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Guile_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Guile_TypeClientData
|
||||
#define SWIG_PackData SWIG_Guile_PackData
|
||||
#define SWIG_UnpackData SWIG_Guile_UnpackData
|
||||
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
file. */
|
||||
|
||||
/* Include headers */
|
||||
%runtime "precommon.swg"
|
||||
%runtime "common.swg"
|
||||
%runtime "mzrun.swg"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* mzscheme/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_MzScheme_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_MzScheme_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_MzScheme_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_MzScheme_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_MzScheme_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_MzScheme_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_MzScheme_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_MzScheme_TypeClientData
|
||||
#define SWIG_PackData SWIG_MzScheme_PackData
|
||||
#define SWIG_UnpackData SWIG_MzScheme_UnpackData
|
||||
|
||||
|
|
@ -4,25 +4,6 @@
|
|||
* Perl 5 configuration file
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%runtime "precommon.swg"
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%runtime "common.swg" // common type checking code
|
||||
%runtime "perlrun.swg" // Perl runtime functions
|
||||
%runtime "noembed.h" // undefine Perl5 macros
|
||||
|
|
@ -602,9 +583,7 @@ XS(SWIG_init) {
|
|||
int i;
|
||||
static int _init = 0;
|
||||
if (!_init) {
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
SWIG_Perl_LookupTypePointer();
|
||||
#endif
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,19 +185,7 @@ static void SWIG_Perl_LookupTypePointer() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGIMPORT(int) SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *, void **, swig_type_info *, int flags);
|
||||
SWIGIMPORT(void) SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *, void *, swig_type_info *, int flags);
|
||||
SWIGIMPORT(SV *) SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *, swig_type_info *, int flags);
|
||||
SWIGIMPORT(void) SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *);
|
||||
SWIGIMPORT(int) SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *, int flags);
|
||||
SWIGIMPORT(swig_type_info *) SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty);
|
||||
SWIGIMPORT(SV *) SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT char *);
|
||||
|
||||
#else
|
||||
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
static swig_type_info *
|
||||
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
|
||||
swig_type_info *s;
|
||||
if (!ty) return 0; /* Void pointer */
|
||||
|
|
@ -224,7 +212,7 @@ SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
|
|||
|
||||
/* Function for getting a pointer value */
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
|
||||
swig_type_info *tc;
|
||||
void *voidptr = (void *)0;
|
||||
|
|
@ -285,7 +273,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
|
|||
return 0;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
|
||||
if (ptr && (flags & SWIG_SHADOW)) {
|
||||
SV *self;
|
||||
|
|
@ -314,14 +302,14 @@ SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, i
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(SV *)
|
||||
static inline SV *
|
||||
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
|
||||
SV *result = sv_newmortal();
|
||||
SWIG_MakePtr(result, ptr, t, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
|
||||
char result[1024];
|
||||
char *r = result;
|
||||
|
|
@ -333,7 +321,7 @@ SWIGRUNTIME(void)
|
|||
}
|
||||
|
||||
/* Convert a packed value value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
||||
swig_type_info *tc;
|
||||
char *c = 0;
|
||||
|
|
@ -351,17 +339,17 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_
|
|||
return 0;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static inline void
|
||||
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
|
||||
if (error) sv_setpv(perl_get_sv("@", TRUE), error);
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static inline void
|
||||
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
|
||||
if (error) sv_setsv(perl_get_sv("@", TRUE), error);
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static inline void
|
||||
SWIG_Perl_SetErrorf(const char *fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
|
@ -369,8 +357,6 @@ SWIG_Perl_SetErrorf(const char *fmt, ...) {
|
|||
va_end(args);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Macros for low-level exception handling */
|
||||
#define SWIG_fail goto fail
|
||||
#define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* perl5/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Perl_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Perl_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Perl_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Perl_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Perl_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Perl_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Perl_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Perl_TypeClientData
|
||||
#define SWIG_PackData SWIG_Perl_PackData
|
||||
#define SWIG_UnpackData SWIG_Perl_UnpackData
|
||||
|
||||
|
|
@ -5,7 +5,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
%runtime "precommon.swg"
|
||||
%runtime "common.swg" // common type checking code
|
||||
%runtime "php4run.swg" // Php4 runtime functions
|
||||
%include "utils.i" // building blocks
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) {};
|
|||
|
||||
/* This one makes old swig style string pointers but the php module doesn't
|
||||
use these any more. This is just left here for old times sake and may go */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
|
||||
static char hex[17] = "0123456789abcdef";
|
||||
unsigned long p, s;
|
||||
|
|
@ -72,7 +72,7 @@ SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_SetPointerChar(char **c, void *ptr, swig_type_info *type) {
|
||||
char data[512];
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ SWIG_SetPointerChar(char **c, void *ptr, swig_type_info *type) {
|
|||
|
||||
#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d, SWIG_module_entry TSRMLS_CC)
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject, zend_module_entry* module_entry TSRMLS_DC) {
|
||||
swig_object_wrapper *value=NULL;
|
||||
/* No need to call SWIG_MakePtr here! */
|
||||
|
|
@ -102,7 +102,7 @@ SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject,
|
|||
/* This old-style routine converts an old string-pointer c into a real pointer
|
||||
ptr calling making appropriate casting functions according to ty
|
||||
We don't use this any more */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_ConvertPtr_(char *c, void **ptr, swig_type_info *ty) {
|
||||
register int d;
|
||||
unsigned long p;
|
||||
|
|
@ -159,7 +159,7 @@ type_error:
|
|||
SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
|
||||
and the registered zend destructors for which we have one per type each
|
||||
with the type name hard wired in. */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||
swig_type_info *tc;
|
||||
|
||||
|
|
@ -184,7 +184,7 @@ SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **p
|
|||
/* This function fills ptr with a pointer of type ty by extracting the pointer
|
||||
and type info from the resource in z. z must be a resource
|
||||
It uses SWIG_ZTS_ConvertResourceData to do the real work. */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||
swig_object_wrapper *value;
|
||||
void *p;
|
||||
|
|
@ -208,7 +208,7 @@ SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
|||
/* We allow passing of a STRING or RESOURCE pointing to the object
|
||||
or an OBJECT whose _cPtr is a string or resource pointing to the object
|
||||
STRING pointers are very depracated */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
|
||||
char *c;
|
||||
zval *val;
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* php4/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_PHP4_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_PHP4_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_PHP4_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_PHP4_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_PHP4_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_PHP4_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_PHP4_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_PHP4_TypeClientData
|
||||
#define SWIG_PackData SWIG_PHP4_PackData
|
||||
#define SWIG_UnpackData SWIG_PHP4_UnpackData
|
||||
|
||||
|
|
@ -30,15 +30,8 @@ typedef struct swig_object_wrapper {
|
|||
#define SWIG_ConvertPtr SWIG_Pike_ConvertPtr
|
||||
#define SWIG_NewPointerObj SWIG_Pike_NewPointerObj
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGEXPORT(int) SWIG_Pike_ConvertPtr(struct object *, void **, swig_type_info *, int);
|
||||
SWIGEXPORT(struct object *) SWIG_Pike_NewPointerObj(void *, swig_type_info *, int);
|
||||
|
||||
#else
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int flags) {
|
||||
char *storage;
|
||||
struct program *pr;
|
||||
|
|
@ -54,9 +47,7 @@ SWIG_Pike_ConvertPtr(struct object *obj, void **ptr, swig_type_info *ty, int fla
|
|||
}
|
||||
|
||||
/* Create a new pointer object */
|
||||
SWIGRUNTIME(struct object *)
|
||||
static struct object *
|
||||
SWIG_Pike_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* pike/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Pike_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Pike_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Pike_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Pike_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Pike_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Pike_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Pike_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Pike_TypeClientData
|
||||
#define SWIG_PackData SWIG_Pike_PackData
|
||||
#define SWIG_UnpackData SWIG_Pike_UnpackData
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* python/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Python_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Python_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Python_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Python_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Python_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Python_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Python_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Python_TypeClientData
|
||||
#define SWIG_PackData SWIG_Python_PackData
|
||||
#define SWIG_UnpackData SWIG_Python_UnpackData
|
||||
|
||||
|
|
@ -22,9 +22,7 @@ SWIGEXPORT(void) SWIG_init(void) {
|
|||
d = PyModule_GetDict(m);
|
||||
|
||||
if (!typeinit) {
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
SWIG_Python_LookupTypePointer(&swig_type_list_handle);
|
||||
#endif
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,37 +12,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SWIG extern declarations
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
SWIGIMPORT(int) SWIG_Python_ConvertPtr(PyObject *, void **, swig_type_info *, int);
|
||||
SWIGIMPORT(PyObject *) SWIG_Python_NewPointerObj(void *, swig_type_info *,int own);
|
||||
SWIGIMPORT(void *) SWIG_Python_MustGetPtr(PyObject *, swig_type_info *, int, int);
|
||||
SWIGIMPORT(PyObject *) SWIG_Python_newvarlink(void);
|
||||
SWIGIMPORT(void) SWIG_Python_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *));
|
||||
SWIGIMPORT(int) SWIG_Python_ConvertPacked(PyObject *, void *, size_t sz, swig_type_info *, int);
|
||||
SWIGIMPORT(PyObject *) SWIG_Python_NewPackedObj(void *, size_t sz, swig_type_info *);
|
||||
SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]);
|
||||
SWIGIMPORT(char *) SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz);
|
||||
SWIGIMPORT(void) SWIG_Python_FixMethods(PyMethodDef *methods,
|
||||
swig_const_info *const_table,
|
||||
swig_type_info **types,
|
||||
swig_type_info **types_initial);
|
||||
|
||||
SWIGIMPORT(int) SWIG_Python_AddErrMesg(const char* mesg, int infront);
|
||||
SWIGIMPORT(int) SWIG_Python_ArgFail(int argnum);
|
||||
SWIGIMPORT(void) SWIG_Python_TypeError(const char *type, PyObject *obj);
|
||||
SWIGIMPORT(void) SWIG_Python_NullRef(const char *type);
|
||||
|
||||
SWIGRUNTIME(void) SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle);
|
||||
|
||||
#else /* SWIG_NOINCLUDE */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* global variable support code.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
|
@ -166,7 +135,7 @@ static PyTypeObject varlinktype = {
|
|||
};
|
||||
|
||||
/* Create a variable linking object for use later */
|
||||
SWIGRUNTIME(PyObject *)
|
||||
static PyObject *
|
||||
SWIG_Python_newvarlink(void) {
|
||||
swig_varlinkobject *result = 0;
|
||||
result = PyMem_NEW(swig_varlinkobject,1);
|
||||
|
|
@ -178,7 +147,7 @@ SWIG_Python_newvarlink(void) {
|
|||
return ((PyObject*) result);
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
||||
swig_varlinkobject *v;
|
||||
swig_globalvar *gv;
|
||||
|
|
@ -196,7 +165,7 @@ SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int
|
|||
* errors manipulation
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Python_TypeError(const char *type, PyObject *obj)
|
||||
{
|
||||
const char *otype = (obj ? obj->ob_type->tp_name : 0);
|
||||
|
|
@ -212,7 +181,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static inline void
|
||||
SWIG_Python_NullRef(const char *type)
|
||||
{
|
||||
if (type) {
|
||||
|
|
@ -222,7 +191,7 @@ SWIG_Python_NullRef(const char *type)
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
||||
{
|
||||
if (PyErr_Occurred()) {
|
||||
|
|
@ -247,7 +216,7 @@ SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Python_ArgFail(int argnum)
|
||||
{
|
||||
if (PyErr_Occurred()) {
|
||||
|
|
@ -266,7 +235,7 @@ SWIG_Python_ArgFail(int argnum)
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
|
||||
swig_type_info *tc;
|
||||
char *c = 0;
|
||||
|
|
@ -376,7 +345,7 @@ type_error:
|
|||
}
|
||||
|
||||
/* Convert a pointer value, signal an exception on a type mismatch */
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
|
||||
void *result;
|
||||
if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
|
||||
|
|
@ -390,7 +359,7 @@ SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags)
|
|||
}
|
||||
|
||||
/* Convert a packed value value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
|
||||
swig_type_info *tc;
|
||||
char *c = 0;
|
||||
|
|
@ -420,7 +389,7 @@ type_error:
|
|||
}
|
||||
|
||||
/* Create a new pointer string */
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
|
||||
char *r = buff;
|
||||
if ((2*sizeof(void *) + 2) > bsz) return 0;
|
||||
|
|
@ -433,7 +402,7 @@ SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
|
|||
|
||||
|
||||
/* Create a new pointer object */
|
||||
SWIGRUNTIME(PyObject *)
|
||||
static PyObject *
|
||||
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
||||
PyObject *robj;
|
||||
if (!ptr) {
|
||||
|
|
@ -466,7 +435,7 @@ SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
|
|||
return robj;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(PyObject *)
|
||||
static PyObject *
|
||||
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
|
||||
char result[1024];
|
||||
char *r = result;
|
||||
|
|
@ -483,7 +452,7 @@ SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* Install Constants */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||
int i;
|
||||
PyObject *obj;
|
||||
|
|
@ -521,7 +490,7 @@ SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
|||
}
|
||||
|
||||
/* Fix SwigMethods to carry the callback ptrs when needed */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Python_FixMethods(PyMethodDef *methods,
|
||||
swig_const_info *const_table,
|
||||
swig_type_info **types,
|
||||
|
|
@ -563,7 +532,7 @@ SWIG_Python_FixMethods(PyMethodDef *methods,
|
|||
/* -----------------------------------------------------------------------------
|
||||
* Lookup type pointer
|
||||
* ----------------------------------------------------------------------------- */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
|
||||
PyObject *module, *pointer;
|
||||
void *type_pointer;
|
||||
|
|
@ -583,9 +552,6 @@ SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* SWIG_NOINCLUDE */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,25 +4,6 @@
|
|||
#include <Python.h>
|
||||
%}
|
||||
|
||||
%insert(runtime) "precommon.swg";
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%insert(runtime) "common.swg"; /* Common type-checking code */
|
||||
%insert(runtime) "pyapi.swg"; /* SWIG/Pyton API */
|
||||
%insert(runtime) "pyrun.swg"; /* Python run-time code */
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* ruby/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Ruby_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Ruby_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Ruby_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Ruby_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Ruby_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Ruby_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Ruby_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Ruby_TypeClientData
|
||||
#define SWIG_PackData SWIG_Ruby_PackData
|
||||
#define SWIG_UnpackData SWIG_Ruby_UnpackData
|
||||
|
||||
/* Also rename all exported symbols from rubydef.swig */
|
||||
|
||||
/* Common SWIG API */
|
||||
#define SWIG_ConvertPtr(obj, pp, type, flags) \
|
||||
SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
|
||||
#define SWIG_NewPointerObj(p, type, flags) \
|
||||
SWIG_Ruby_NewPointerObj(p, type, flags)
|
||||
#define SWIG_MustGetPtr(p, type, argnum, flags) \
|
||||
SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
|
||||
|
||||
/* Ruby-specific SWIG API */
|
||||
|
||||
#define SWIG_InitRuntime() \
|
||||
SWIG_Ruby_InitRuntime()
|
||||
#define SWIG_define_class(ty) \
|
||||
SWIG_Ruby_define_class(ty)
|
||||
#define SWIG_NewClassInstance(value, ty) \
|
||||
SWIG_Ruby_NewClassInstance(value, ty)
|
||||
#define SWIG_MangleStr(value) \
|
||||
SWIG_Ruby_MangleStr(value)
|
||||
#define SWIG_CheckConvert(value, ty) \
|
||||
SWIG_Ruby_CheckConvert(value, ty)
|
||||
#define SWIG_NewPackedObj(ptr, sz, ty) \
|
||||
SWIG_Ruby_NewPackedObj(ptr, sz, ty)
|
||||
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
|
||||
SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
||||
|
||||
|
|
@ -5,38 +5,8 @@
|
|||
* ---------------------------------------------------------------------- */
|
||||
|
||||
%runtime "rubyhead.swg"
|
||||
%runtime "precommon.swg"
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%runtime "common.swg"
|
||||
|
||||
%insert(runtime) %{
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
%}
|
||||
%runtime "rubydec.swg"
|
||||
%insert(runtime) %{
|
||||
#else
|
||||
%}
|
||||
%runtime "rubydef.swg"
|
||||
%insert(runtime) %{
|
||||
#endif
|
||||
%}
|
||||
|
||||
#define %alias %feature("alias")
|
||||
#define %freefunc %feature("freefunc")
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/* rubydec.swg -*- c -*- */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SWIGIMPORT(void) SWIG_Ruby_InitRuntime(void);
|
||||
SWIGIMPORT(void) SWIG_Ruby_define_class(swig_type_info *);
|
||||
SWIGIMPORT(VALUE) SWIG_Ruby_NewPointerObj(void *, swig_type_info *, int);
|
||||
SWIGIMPORT(VALUE) SWIG_Ruby_NewClassInstance(VALUE, swig_type_info *);
|
||||
SWIGIMPORT(char *) SWIG_Ruby_MangleStr(VALUE);
|
||||
SWIGIMPORT(int) SWIG_Ruby_ConvertPtr(VALUE, void**, swig_type_info *, int);
|
||||
SWIGIMPORT(void *) SWIG_Ruby_MustGetPtr(VALUE, swig_type_info *, int, int);
|
||||
SWIGIMPORT(int) SWIG_Ruby_CheckConvert(VALUE, swig_type_info *);
|
||||
SWIGIMPORT(VALUE) SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type);
|
||||
SWIGIMPORT(void) SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,3 +1,28 @@
|
|||
/* Common SWIG API */
|
||||
#define SWIG_ConvertPtr(obj, pp, type, flags) \
|
||||
SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
|
||||
#define SWIG_NewPointerObj(p, type, flags) \
|
||||
SWIG_Ruby_NewPointerObj(p, type, flags)
|
||||
#define SWIG_MustGetPtr(p, type, argnum, flags) \
|
||||
SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
|
||||
|
||||
/* Ruby-specific SWIG API */
|
||||
|
||||
#define SWIG_InitRuntime() \
|
||||
SWIG_Ruby_InitRuntime()
|
||||
#define SWIG_define_class(ty) \
|
||||
SWIG_Ruby_define_class(ty)
|
||||
#define SWIG_NewClassInstance(value, ty) \
|
||||
SWIG_Ruby_NewClassInstance(value, ty)
|
||||
#define SWIG_MangleStr(value) \
|
||||
SWIG_Ruby_MangleStr(value)
|
||||
#define SWIG_CheckConvert(value, ty) \
|
||||
SWIG_Ruby_CheckConvert(value, ty)
|
||||
#define SWIG_NewPackedObj(ptr, sz, ty) \
|
||||
SWIG_Ruby_NewPackedObj(ptr, sz, ty)
|
||||
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
|
||||
SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
|
||||
|
||||
/* rubydef.swg */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -8,7 +33,7 @@ static VALUE _cSWIG_Pointer = Qnil;
|
|||
static VALUE swig_runtime_data_type_pointer = Qnil;
|
||||
|
||||
/* Initialize Ruby runtime support */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Ruby_InitRuntime(void)
|
||||
{
|
||||
VALUE pointer;
|
||||
|
|
@ -17,7 +42,6 @@ SWIG_Ruby_InitRuntime(void)
|
|||
_mSWIG = rb_define_module("SWIG");
|
||||
}
|
||||
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
/* first check if pointer already created */
|
||||
pointer = rb_gv_get("$swig_runtime_data_type_pointer");
|
||||
if (pointer != Qnil) {
|
||||
|
|
@ -29,11 +53,10 @@ SWIG_Ruby_InitRuntime(void)
|
|||
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, swig_type_list_handle);
|
||||
rb_define_readonly_variable("$swig_runtime_data_type_pointer", &swig_runtime_data_type_pointer);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Define Ruby class for C type */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Ruby_define_class(swig_type_info *type)
|
||||
{
|
||||
VALUE klass;
|
||||
|
|
@ -48,7 +71,7 @@ SWIG_Ruby_define_class(swig_type_info *type)
|
|||
}
|
||||
|
||||
/* Create a new pointer object */
|
||||
SWIGRUNTIME(VALUE)
|
||||
static VALUE
|
||||
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
|
||||
{
|
||||
char *klass_name;
|
||||
|
|
@ -74,7 +97,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
|
|||
}
|
||||
|
||||
/* Create a new class instance (always owned) */
|
||||
SWIGRUNTIME(VALUE)
|
||||
static VALUE
|
||||
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
||||
{
|
||||
VALUE obj;
|
||||
|
|
@ -85,7 +108,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
|
|||
}
|
||||
|
||||
/* Get type mangle from class name */
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_Ruby_MangleStr(VALUE obj)
|
||||
{
|
||||
VALUE stype = rb_iv_get(obj, "__swigtype__");
|
||||
|
|
@ -93,7 +116,7 @@ SWIG_Ruby_MangleStr(VALUE obj)
|
|||
}
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
|
||||
{
|
||||
char *c;
|
||||
|
|
@ -135,7 +158,7 @@ SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
|
|||
}
|
||||
|
||||
/* Convert a pointer value, signal an exception on a type mismatch */
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
|
||||
{
|
||||
void *result;
|
||||
|
|
@ -144,7 +167,7 @@ SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
|
|||
}
|
||||
|
||||
/* Check convert */
|
||||
SWIGRUNTIME(int)
|
||||
static inline int
|
||||
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
|
||||
{
|
||||
char *c = SWIG_MangleStr(obj);
|
||||
|
|
@ -153,7 +176,7 @@ SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
|
|||
return SWIG_TypeCheck(c,ty) != 0;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(VALUE)
|
||||
static VALUE
|
||||
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
||||
char result[1024];
|
||||
char *r = result;
|
||||
|
|
@ -165,7 +188,7 @@ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
|
|||
}
|
||||
|
||||
/* Convert a packed value value */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
||||
swig_type_info *tc;
|
||||
char *c;
|
||||
|
|
|
|||
10
Lib/swig.swg
10
Lib/swig.swg
|
|
@ -271,16 +271,6 @@ namespace std {
|
|||
%define SWIG_TYPECHECK_STRING_ARRAY 1140 %enddef
|
||||
%define SWIG_TYPECHECK_OBJECT_ARRAY 1150 %enddef
|
||||
|
||||
/* Switch to enable runtime mode */
|
||||
|
||||
#ifndef SWIGSEXP
|
||||
#ifdef SWIG_RUNTIME_MODE
|
||||
%insert("runtime") %{
|
||||
#define SWIG_GLOBAL 1
|
||||
%}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This template wrapper is used to handle C++ objects that are passed or
|
||||
* returned by value. This is necessary to handle objects that define
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
/*************************************************************** -*- c -*-
|
||||
* Tcl/precommon.swg
|
||||
*
|
||||
* Rename all exported symbols from common.swg, to avoid symbol
|
||||
* clashes if multiple interpreters are included
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#define SWIG_TypeRegister SWIG_Tcl_TypeRegister
|
||||
#define SWIG_TypeCheck SWIG_Tcl_TypeCheck
|
||||
#define SWIG_TypeCast SWIG_Tcl_TypeCast
|
||||
#define SWIG_TypeDynamicCast SWIG_Tcl_TypeDynamicCast
|
||||
#define SWIG_TypeName SWIG_Tcl_TypeName
|
||||
#define SWIG_TypePrettyName SWIG_Tcl_TypePrettyName
|
||||
#define SWIG_TypeQuery SWIG_Tcl_TypeQuery
|
||||
#define SWIG_TypeClientData SWIG_Tcl_TypeClientData
|
||||
#define SWIG_PackData SWIG_Tcl_PackData
|
||||
#define SWIG_UnpackData SWIG_Tcl_UnpackData
|
||||
|
||||
|
|
@ -122,35 +122,12 @@ SWIG_Tcl_LookupTypePointer(Tcl_Interp *interp) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *, char *, void **, swig_type_info *,int flags);
|
||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPtr(Tcl_Interp *, Tcl_Obj *, void **, swig_type_info *, int flags);
|
||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPacked(Tcl_Interp *, Tcl_Obj *, void *, int sz, swig_type_info *, int flags);
|
||||
SWIGIMPORT(void) SWIG_Tcl_MakePtr(char *, void *, swig_type_info *, int flags);
|
||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewPointerObj(void *, swig_type_info *, int flags);
|
||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewPackedObj(void *, int sz, swig_type_info *, int flags);
|
||||
SWIGIMPORT(int) SWIG_Tcl_GetArgs(Tcl_Interp *, int, Tcl_Obj *CONST [], const char *, ...);
|
||||
SWIGIMPORT(char *) SWIG_Tcl_PointerTypeFromString(char *c);
|
||||
SWIGIMPORT(void) SWIG_Tcl_Acquire(void *ptr);
|
||||
SWIGIMPORT(int) SWIG_Tcl_Disown(void *ptr);
|
||||
SWIGIMPORT(int) SWIG_Tcl_Thisown(void *ptr);
|
||||
SWIGIMPORT(void) SWIG_Tcl_InstallConstants(Tcl_Interp *interp, struct swig_const_info constants[]);
|
||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_GetConstant(const char *key);
|
||||
SWIGIMPORT(Tcl_Obj *) SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *, swig_type_info *, int flags);
|
||||
SWIGIMPORT(int) SWIG_Tcl_ObjectConstructor(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
|
||||
SWIGIMPORT(int) SWIG_Tcl_MethodCommand(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST objv[]);
|
||||
SWIGIMPORT(void) SWIG_Tcl_ObjectDelete(ClientData);
|
||||
|
||||
#else
|
||||
|
||||
/* Object support */
|
||||
static Tcl_HashTable swigobjectTable;
|
||||
static int swigobjectTableinit = 0;
|
||||
|
||||
/* Acquire ownership of a pointer */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Tcl_Acquire(void *ptr) {
|
||||
Tcl_HashEntry *entryPtr;
|
||||
int newobj;
|
||||
|
|
@ -162,7 +139,7 @@ SWIG_Tcl_Acquire(void *ptr) {
|
|||
}
|
||||
|
||||
/* Disown a pointer. Returns 1 if we owned it to begin with */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Tcl_Disown(void *ptr) {
|
||||
Tcl_HashEntry *entryPtr;
|
||||
if (!swigobjectTableinit) return 0;
|
||||
|
|
@ -174,7 +151,7 @@ SWIG_Tcl_Disown(void *ptr) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static inline int
|
||||
SWIG_Tcl_Thisown(void *ptr) {
|
||||
if (!swigobjectTableinit) return 0;
|
||||
if (Tcl_FindHashEntry(&swigobjectTable, (char *) ptr)) {
|
||||
|
|
@ -184,7 +161,7 @@ SWIG_Tcl_Thisown(void *ptr) {
|
|||
}
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type_info *ty, int flags) {
|
||||
swig_type_info *tc;
|
||||
/* Pointer values must start with leading underscore */
|
||||
|
|
@ -223,13 +200,13 @@ SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, char *c, void **ptr, swig_type
|
|||
}
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGRUNTIME(int)
|
||||
static inline int
|
||||
SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) {
|
||||
return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
|
||||
}
|
||||
|
||||
/* Convert a pointer value */
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_Tcl_PointerTypeFromString(char *c) {
|
||||
char d;
|
||||
/* Pointer values must start with leading underscore. NULL has no type */
|
||||
|
|
@ -246,7 +223,7 @@ SWIG_Tcl_PointerTypeFromString(char *c) {
|
|||
}
|
||||
|
||||
/* Convert a packed value value */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Tcl_ConvertPacked(Tcl_Interp *interp, Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
|
||||
swig_type_info *tc;
|
||||
char *c;
|
||||
|
|
@ -280,7 +257,7 @@ type_error:
|
|||
|
||||
|
||||
/* Take a pointer and convert it to a string */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
|
||||
if (ptr) {
|
||||
*(c++) = '_';
|
||||
|
|
@ -293,7 +270,7 @@ SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
|
|||
}
|
||||
|
||||
/* Create a new pointer object */
|
||||
SWIGRUNTIME(Tcl_Obj *)
|
||||
static Tcl_Obj *
|
||||
SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
|
||||
Tcl_Obj *robj;
|
||||
char result[512];
|
||||
|
|
@ -302,7 +279,7 @@ SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
|
|||
return robj;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(Tcl_Obj *)
|
||||
static Tcl_Obj *
|
||||
SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type, int flags) {
|
||||
char result[1024];
|
||||
char *r = result;
|
||||
|
|
@ -318,7 +295,7 @@ static Tcl_HashTable swigconstTable;
|
|||
static int swigconstTableinit = 0;
|
||||
|
||||
/* Install Constants */
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
||||
int i;
|
||||
Tcl_Obj *obj;
|
||||
|
|
@ -358,7 +335,7 @@ SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(Tcl_Obj *)
|
||||
static Tcl_Obj *
|
||||
SWIG_Tcl_GetConstant(const char *key) {
|
||||
Tcl_HashEntry *entryPtr;
|
||||
if (!swigconstTableinit) return 0;
|
||||
|
|
@ -371,7 +348,7 @@ SWIG_Tcl_GetConstant(const char *key) {
|
|||
}
|
||||
|
||||
/* Get arguments */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
|
||||
int argno = 0, opt = 0;
|
||||
long tempi;
|
||||
|
|
@ -468,7 +445,7 @@ SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Tcl_ObjectDelete(ClientData clientData) {
|
||||
swig_instance *si = (swig_instance *) clientData;
|
||||
if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
|
||||
|
|
@ -481,7 +458,7 @@ SWIG_Tcl_ObjectDelete(ClientData clientData) {
|
|||
}
|
||||
|
||||
/* Function to invoke object methods given an instance */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
|
||||
char *method, *attrname;
|
||||
swig_instance *inst = (swig_instance *) clientData;
|
||||
|
|
@ -650,7 +627,7 @@ SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_
|
|||
}
|
||||
|
||||
/* Function to create objects */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
|
||||
Tcl_Obj *newObj = 0;
|
||||
void *thisvalue = 0;
|
||||
|
|
@ -729,7 +706,7 @@ SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc,
|
|||
|
||||
|
||||
/* This function takes the current result and turns it into an object command */
|
||||
SWIGRUNTIME(Tcl_Obj *)
|
||||
static Tcl_Obj *
|
||||
SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
|
||||
Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
|
||||
/* Check to see if this pointer belongs to a class or not */
|
||||
|
|
@ -753,8 +730,6 @@ SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *typ
|
|||
return robj;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Structure for command table */
|
||||
typedef struct {
|
||||
const char *name;
|
||||
|
|
|
|||
|
|
@ -4,25 +4,6 @@
|
|||
* Tcl8 configuration module.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%runtime "precommon.swg"
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%runtime "common.swg"
|
||||
%runtime "swigtcl8.swg"
|
||||
|
||||
|
|
@ -664,9 +645,7 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
|
|||
Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
|
||||
#endif
|
||||
if (!_init) {
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
SWIG_Tcl_LookupTypePointer(interp);
|
||||
#endif
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue