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
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue