Added missing SWIGIMPORT to runtime library functions

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5410 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-11-25 21:15:15 +00:00
commit 60c74da9c6

View file

@ -8,8 +8,7 @@
#define SWIGPERL #define SWIGPERL
#define SWIGPERL5 #define SWIGPERL5
#ifdef __cplusplus #ifdef __cplusplus
/* Needed on some windows machines---since MS plays funny /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
games with the header files under C++ */
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
extern "C" { extern "C" {
@ -34,21 +33,20 @@ extern "C" {
/* Macro to call an XS function */ /* Macro to call an XS function */
#ifdef PERL_OBJECT #ifdef PERL_OBJECT
#define SWIG_CALLXS(_name) _name(cv,pPerl) # define SWIG_CALLXS(_name) _name(cv,pPerl)
#else #else
#ifndef MULTIPLICITY # ifndef MULTIPLICITY
#define SWIG_CALLXS(_name) _name(cv) # define SWIG_CALLXS(_name) _name(cv)
#else # else
#define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
#endif # endif
#endif #endif
/* Contract support */ /* Contract support */
#define SWIG_contract_assert(expr,msg) if (!(expr)) { SWIG_croak(msg); } else #define SWIG_contract_assert(expr,msg) if (!(expr)) { SWIG_croak(msg); } else
/* Note: SwigMagicFuncHack is a typedef used to get the C++ /* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
compiler to just shut up already */
#ifdef PERL_OBJECT #ifdef PERL_OBJECT
#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
@ -101,15 +99,15 @@ typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
/* Modifications for newer Perl 5.005 releases */ /* Modifications for newer Perl 5.005 releases */
#if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50)))) #if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50))))
#ifndef PL_sv_yes # ifndef PL_sv_yes
#define PL_sv_yes sv_yes # define PL_sv_yes sv_yes
#endif # endif
#ifndef PL_sv_undef # ifndef PL_sv_undef
#define PL_sv_undef sv_undef # define PL_sv_undef sv_undef
#endif # endif
#ifndef PL_na # ifndef PL_na
#define PL_na na # define PL_na na
#endif # endif
#endif #endif
#include <stdlib.h> #include <stdlib.h>
@ -165,29 +163,16 @@ extern "C" {
#ifdef SWIG_NOINCLUDE #ifdef SWIG_NOINCLUDE
extern int SWIGIMPORT(int) SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *, void **, swig_type_info *, int flags);
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SWIGIMPORT(void) SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *, void *, swig_type_info *, int flags);
SV *, void **, swig_type_info *, int flags); SWIGIMPORT(SV *) SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *, swig_type_info *, int flags);
extern void SWIGIMPORT(swig_type_info *) SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty);
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SWIGIMPORT(SV *) SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT char *);
SV *, void *, swig_type_info *, int flags);
extern SV *
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT
void *, swig_type_info *, int flags);
extern swig_type_info *
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT
SV *rv, swig_type_info *ty);
extern SV *
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT
char *);
#else #else
SWIGRUNTIME(swig_type_info *) SWIGRUNTIME(swig_type_info *)
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
SV *rv, swig_type_info *ty)
{
swig_type_info *s; swig_type_info *s;
if (!ty) return 0; /* Void pointer */ if (!ty) return 0; /* Void pointer */
s = ty->next; /* First element always just a name */ s = ty->next; /* First element always just a name */
@ -197,13 +182,13 @@ SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT
/* Move s to the top of the linked list */ /* Move s to the top of the linked list */
s->prev->next = s->next; s->prev->next = s->next;
if (s->next) { if (s->next) {
s->next->prev = s->prev; s->next->prev = s->prev;
} }
/* Insert s as second element in the list */ /* Insert s as second element in the list */
s->next = ty->next; s->next = ty->next;
if (ty->next) ty->next->prev = s; if (ty->next) ty->next->prev = s;
ty->next = s; ty->next = s;
s->prev = ty; /**/ s->prev = ty;
return s; return s;
} }
s = s->next; s = s->next;
@ -214,9 +199,7 @@ SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT
/* Function for getting a pointer value */ /* Function for getting a pointer value */
SWIGRUNTIME(int) SWIGRUNTIME(int)
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
SV *sv, void **ptr, swig_type_info *_t, int flags)
{
swig_type_info *tc; swig_type_info *tc;
void *voidptr = (void *)0; void *voidptr = (void *)0;
@ -259,8 +242,8 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT
else else
return -1; return -1;
} else { /* Don't know what it is */ } else { /* Don't know what it is */
*(ptr) = (void *) 0; *(ptr) = (void *) 0;
return -1; return -1;
} }
if (_t) { if (_t) {
/* Now see if the types match */ /* Now see if the types match */
@ -277,9 +260,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT
} }
SWIGRUNTIME(void) SWIGRUNTIME(void)
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
SV *sv, void *ptr, swig_type_info *t, int flags)
{
if (ptr && (flags & SWIG_SHADOW)) { if (ptr && (flags & SWIG_SHADOW)) {
SV *self; SV *self;
SV *obj=newSV(0); SV *obj=newSV(0);
@ -308,36 +289,28 @@ SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT
} }
SWIGRUNTIME(SV *) SWIGRUNTIME(SV *)
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
void *ptr, swig_type_info *t, int flags)
{
SV *result = sv_newmortal(); SV *result = sv_newmortal();
SWIG_MakePtr(result, ptr, t, flags); SWIG_MakePtr(result, ptr, t, flags);
return result; return result;
} }
SWIGRUNTIME(void) SWIGRUNTIME(void)
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
const char *error) if (error) sv_setpv(get_sv("@", TRUE), error);
{
if (error) sv_setpv(get_sv("@", TRUE), error);
} }
SWIGRUNTIME(void) SWIGRUNTIME(void)
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
SV *error) if (error) sv_setsv(get_sv("@", TRUE), error);
{
if (error) sv_setsv(get_sv("@", TRUE), error);
} }
SWIGRUNTIME(void) SWIGRUNTIME(void)
SWIG_Perl_SetErrorf(const char *fmt, ...) SWIG_Perl_SetErrorf(const char *fmt, ...) {
{ va_list args;
va_list args; va_start(args, fmt);
va_start(args, fmt); sv_vsetpvfn(get_sv("@", TRUE), fmt, strlen(fmt), &args, Null(SV**), 0, Null(bool*));
sv_vsetpvfn(get_sv("@", TRUE), fmt, strlen(fmt), &args, va_end(args);
Null(SV**), 0, Null(bool*));
va_end(args);
} }
#endif #endif
@ -393,14 +366,12 @@ typedef struct {
#ifndef PERL_OBJECT #ifndef PERL_OBJECT
#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
#ifndef MULTIPLICITY #ifndef MULTIPLICITY
static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int \ static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
(*get)(SV *,MAGIC *)) {
#else #else
static void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*,\ static void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) {
SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) {
#endif #endif
#else #else
#define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
static void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) { static void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) {
#endif #endif
MAGIC *mg; MAGIC *mg;