fix runtimes for subversion
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0a98e76136
commit
41b66ae54a
5 changed files with 107 additions and 105 deletions
|
|
@ -77,6 +77,104 @@ extern "C" {
|
|||
|
||||
#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
|
||||
#ifndef pTHX_
|
||||
#define pTHX_
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Macro to call an XS function */
|
||||
|
||||
#ifdef PERL_OBJECT
|
||||
# define SWIG_CALLXS(_name) _name(cv,pPerl)
|
||||
#else
|
||||
# ifndef MULTIPLICITY
|
||||
# define SWIG_CALLXS(_name) _name(cv)
|
||||
# else
|
||||
# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
|
||||
|
||||
#ifdef PERL_OBJECT
|
||||
#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
|
||||
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
|
||||
#define SWIGCLASS_STATIC
|
||||
#else
|
||||
#define MAGIC_PPERL
|
||||
#define SWIGCLASS_STATIC static SWIGUNUSED
|
||||
#ifndef MULTIPLICITY
|
||||
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
|
||||
typedef int (*SwigMagicFunc)(SV *, MAGIC *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
|
||||
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
|
||||
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
|
||||
#endif
|
||||
|
||||
/* Modifications for newer Perl 5.005 releases */
|
||||
|
||||
#if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50))))
|
||||
# ifndef PL_sv_yes
|
||||
# define PL_sv_yes sv_yes
|
||||
# endif
|
||||
# ifndef PL_sv_undef
|
||||
# define PL_sv_undef sv_undef
|
||||
# endif
|
||||
# ifndef PL_na
|
||||
# define PL_na na
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
SWIGRUNTIME const char *
|
||||
SWIG_Perl_TypeProxyName(const swig_type_info *type) {
|
||||
if (!type) return NULL;
|
||||
|
|
|
|||
|
|
@ -1,104 +1,3 @@
|
|||
%insert(runtime) %{
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
|
||||
#ifndef pTHX_
|
||||
#define pTHX_
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Macro to call an XS function */
|
||||
|
||||
#ifdef PERL_OBJECT
|
||||
# define SWIG_CALLXS(_name) _name(cv,pPerl)
|
||||
#else
|
||||
# ifndef MULTIPLICITY
|
||||
# define SWIG_CALLXS(_name) _name(cv)
|
||||
# else
|
||||
# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
|
||||
|
||||
#ifdef PERL_OBJECT
|
||||
#define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
|
||||
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
|
||||
#define SWIGCLASS_STATIC
|
||||
#else
|
||||
#define MAGIC_PPERL
|
||||
#define SWIGCLASS_STATIC static SWIGUNUSED
|
||||
#ifndef MULTIPLICITY
|
||||
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
|
||||
typedef int (*SwigMagicFunc)(SV *, MAGIC *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
|
||||
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
|
||||
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
|
||||
#endif
|
||||
|
||||
/* Modifications for newer Perl 5.005 releases */
|
||||
|
||||
#if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50))))
|
||||
# ifndef PL_sv_yes
|
||||
# define PL_sv_yes sv_yes
|
||||
# endif
|
||||
# ifndef PL_sv_undef
|
||||
# define PL_sv_undef sv_undef
|
||||
# endif
|
||||
# ifndef PL_na
|
||||
# define PL_na na
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
%}
|
||||
|
||||
|
||||
%runtime "swigrun.swg" // Common C API type-checking code
|
||||
%runtime "perlrun.swg" // Perl runtime functions
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@
|
|||
#define SWIG_POINTER_NOSHADOW SWIG_POINTER_OWN << 1
|
||||
#define SWIG_POINTER_NEW SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN
|
||||
|
||||
/* For backward compatibility only */
|
||||
#define SWIG_POINTER_EXCEPTION 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#if 0
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
/* Errors in SWIG */
|
||||
|
||||
#define SWIG_OK 0
|
||||
#define SWIG_ERROR -1
|
||||
|
||||
#define SWIG_MemoryError 1
|
||||
#define SWIG_IOError 2
|
||||
#define SWIG_RuntimeError 3
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@
|
|||
#define SWIG_OLDOBJ 1
|
||||
#define SWIG_NEWOBJ 2
|
||||
|
||||
|
||||
/* Flags for returning states */
|
||||
#define SWIG_OK 0
|
||||
#define SWIG_ERROR -1
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue