- Add SWIG_RUNTIME_VERSION to new type sharing code. This is for future-proof, if
the format of swig_type_info ever changes, this number should be incremented - Add SWIG_LINK_RUNTIME and SWIG_STATIC_RUNTIME symbols to python - Convert inline into SWIGINLINE git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cb3ef63778
commit
b83fe6bd77
14 changed files with 140 additions and 41 deletions
|
|
@ -11,6 +11,16 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define SWIG_RUNTIME_VERSION "1"
|
||||
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
|
||||
#ifdef SWIG_TYPE_TABLE
|
||||
#define SWIG_QUOTE_STRING(x) #x
|
||||
#define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
|
||||
#define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
|
||||
#else
|
||||
#define SWIG_TYPE_TABLE_NAME
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -426,10 +436,10 @@ SWIG_Guile_Init (void)
|
|||
{
|
||||
SCM pointer;
|
||||
|
||||
pointer = gh_lookup("swig_runtime_data_type_pointer");
|
||||
pointer = gh_lookup("swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
||||
if (pointer == SCM_UNDEFINED) {
|
||||
pointer = gh_ulong2scm((unsigned long)SwigModule);
|
||||
gh_define("swig_runtime_data_type_pointer", pointer);
|
||||
gh_define("swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, pointer);
|
||||
if (SwigModule->swig_tag == 0) {
|
||||
SwigModule->swig_tag = scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL,
|
||||
print_swig, equalp_swig);
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static inline void *
|
||||
static SWIGINLINE void *
|
||||
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
||||
int argnum, int flags, const char *func_name)
|
||||
{
|
||||
|
|
@ -177,7 +177,7 @@ SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
|
|||
return result;
|
||||
}
|
||||
|
||||
static inline int
|
||||
static SWIGINLINE int
|
||||
SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
||||
{
|
||||
void *result;
|
||||
|
|
@ -187,8 +187,8 @@ SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
|
|||
}
|
||||
else return 1;
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
||||
static SWIGINLINE int
|
||||
SWIG_Guile_IsPointer (SCM s)
|
||||
{
|
||||
return SWIG_Guile_IsPointerOfType (s, NULL);
|
||||
|
|
@ -330,7 +330,7 @@ SWIG_Guile_Init ()
|
|||
scm_set_smob_equalp(swig_destroyed_tag, equalp_swig);
|
||||
}
|
||||
{
|
||||
SCM variable = scm_sym2var(scm_str2symbol("swig-type-list-address"),
|
||||
SCM variable = scm_sym2var(scm_str2symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME),
|
||||
scm_module_lookup_closure(swig_module),
|
||||
SCM_BOOL_T);
|
||||
if (SCM_UNBNDP(SCM_VARIABLE_REF(variable))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue