From a2676802d9c4a69112ca90e0cfc58900c3e494cc Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 10 Feb 2006 22:54:23 +0000 Subject: [PATCH] Rearrange macros, keeping SWIG macros together and missing perl macros together. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8778 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/perl5/perlrun.swg | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/Lib/perl5/perlrun.swg b/Lib/perl5/perlrun.swg index bb1cd8dbd..8ec2059a7 100644 --- a/Lib/perl5/perlrun.swg +++ b/Lib/perl5/perlrun.swg @@ -159,22 +159,7 @@ typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *); #endif #endif -#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) -#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) -#endif - - -/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ - -#ifndef SvIOK_UV -# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) -#endif - -#ifndef SvUOK -# define SvUOK(sv) SvIOK_UV(sv) -#endif - -/* Salvador's workaround for bug in perl 5.6.x croak and below*/ +/* Workaround for bug in perl 5.6.x croak and earlier */ #if !defined(PERL_VERSION) || (PERL_VERSION < 8) # ifdef PERL_OBJECT # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) @@ -195,7 +180,21 @@ static void SWIG_croak_null() #define SWIG_croak_null() croak(Nullch) #endif -/* Fix for old Perls (except 5.005_04...) */ + +/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */ + +#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE) +#define PerlIO_exportFILE(fh,fl) (FILE*)(fh) +#endif + +#ifndef SvIOK_UV +# define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv))) +#endif + +#ifndef SvUOK +# define SvUOK(sv) SvIOK_UV(sv) +#endif + #if !((PATCHLEVEL == 5) && (SUBVERSION == 4)) # ifndef PL_markstack_ptr # define PL_markstack_ptr Perl_markstack_ptr