From: gfx Date: Sat, 11 Sep 2010 05:49:22 +0000 (+0900) Subject: Switch to use_xshelper(), which is provided by M::I::XSUtil 0.30 X-Git-Tag: 0.68~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=8e4a10a887ee294310139992d722aed93b574379 Switch to use_xshelper(), which is provided by M::I::XSUtil 0.30 --- diff --git a/.gitignore b/.gitignore index 9cf041a..b934cab 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ nytprof* *.out author/externals/ ppport.h +xshelper.h *.bs *.o *.obj diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 9517ae5..54fa0b7 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -52,7 +52,9 @@ lib/Mouse/Tiny\.pm$ # Mouse distributions Mouse- -ppport\.h +ppport\.h$ +xshelper\.h$ + \.o(?:bj)?$ \.c$ \.bs$ diff --git a/Makefile.PL b/Makefile.PL index 4ea3b8c..f340858 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,7 +11,7 @@ use warnings; use inc::Module::Install 1.00; # for co-developpers -use Module::Install::XSUtil 0.27; +use Module::Install::XSUtil 0.30; use Module::Install::AuthorTests; system($^X, 'tool/generate-mouse-tiny.pl', 'lib/Mouse/Tiny.pm') == 0 @@ -29,7 +29,7 @@ test_requires 'Test::Exception' => 0.29; my %suggests = ( 'Any::Moose' => 0.10, - 'Data::Util' => 0.55, + 'MouseX::AttributeHelpers' => 0.06, ); while(my($mod, $least) = each %suggests){ @@ -63,6 +63,7 @@ if($use_xs){ cc_warnings(); use_ppport(3.19); + use_xshelper(); cc_src_paths('xs-src'); } else{ diff --git a/mouse.h b/mouse.h index 841bb7c..88d17da 100644 --- a/mouse.h +++ b/mouse.h @@ -1,7 +1,7 @@ #ifndef MOUSE_H #define MOUSE_H -#include "perlxs.h" +#include "xshelper.h" #ifndef mro_get_linear_isa #define no_mro_get_linear_isa diff --git a/perlxs.h b/perlxs.h deleted file mode 100644 index c676c94..0000000 --- a/perlxs.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - perlxs.h - Standard XS header file - Copyright (c) Fuji, Goro (gfx) -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -#define PERL_NO_GET_CONTEXT /* we want efficiency */ -#include - -#include -#define NO_XSLOCKS /* for exceptions */ -#include - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#include "ppport.h" - -/* portability stuff not supported by ppport.h yet */ - -#ifndef STATIC_INLINE /* from 5.13.4 */ -# if defined(__GNUC__) || defined(__cplusplus__) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) -# define STATIC_INLINE static inline -# else -# define STATIC_INLINE static -# endif -#endif /* STATIC_INLINE */ - -#ifndef __attribute__format__ -#define __attribute__format__(a,b,c) /* nothing */ -#endif - -#ifndef LIKELY /* they are just a compiler's hint */ -#define LIKELY(x) (x) -#define UNLIKELY(x) (x) -#endif - -#ifndef newSVpvs_share -#define newSVpvs_share(s) Perl_newSVpvn_share(aTHX_ STR_WITH_LEN(s), 0U) -#endif - -#ifndef get_cvs -#define get_cvs(name, flags) get_cv(name, flags) -#endif - -#ifndef GvNAME_get -#define GvNAME_get GvNAME -#endif -#ifndef GvNAMELEN_get -#define GvNAMELEN_get GvNAMELEN -#endif - -#ifndef CvGV_set -#define CvGV_set(cv, gv) (CvGV(cv) = (gv)) -#endif - -/* general utility */ - -#if PERL_BCDVERSION >= 0x5008005 -#define LooksLikeNumber(x) looks_like_number(x) -#else -#define LooksLikeNumber(x) (SvPOKp(x) ? looks_like_number(x) : (I32)SvNIOKp(x)) -#endif - -#define newAV_mortal() (AV*)sv_2mortal((SV*)newAV()) -#define newHV_mortal() (HV*)sv_2mortal((SV*)newHV()) - -#define DECL_BOOT(name) EXTERN_C XS(CAT2(boot_, name)) -#define CALL_BOOT(name) STMT_START { \ - PUSHMARK(SP); \ - CALL_FPTR(CAT2(boot_, name))(aTHX_ cv); \ - } STMT_END -