From: Nicholas Clark Date: Sun, 12 Apr 2009 14:05:04 +0000 (+0100) Subject: Convert xsutils.c and lib/attributes.pm to a regular XS extension. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48462a74af687743eb1706910f2a17ba4180660d;p=p5sagit%2Fp5-mst-13.2.git Convert xsutils.c and lib/attributes.pm to a regular XS extension. --- diff --git a/Cross/Makefile-cross-SH b/Cross/Makefile-cross-SH index a078988..806bc09 100755 --- a/Cross/Makefile-cross-SH +++ b/Cross/Makefile-cross-SH @@ -358,7 +358,7 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5) c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro.c perl.c c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c -c3 = taint.c toke.c util.c deb.c run.c universal.c xsutils.c pad.c globals.c +c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c c5 = $(madlysrc) $(mallocsrc) @@ -366,7 +366,7 @@ c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) op$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro$(OBJ_EXT) obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) perl$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) -obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) +obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) diff --git a/Cross/cflags-cross-arm b/Cross/cflags-cross-arm index d33b113..acec8cc 100755 --- a/Cross/cflags-cross-arm +++ b/Cross/cflags-cross-arm @@ -108,7 +108,6 @@ for file do usersub) ;; utf8) ;; util) ;; - xsutils) ;; *) ;; esac diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 0c9262b..d054b59 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -546,7 +546,7 @@ doublesize='8' drand01='drand48()' drand48_r_proto='0' dtrace='' -dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared' +dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared' eagain='EAGAIN' ebcdic='undef' echo='echo' @@ -561,7 +561,7 @@ endservent_r_proto='0' eunicefix=':' exe_ext='' expr='expr' -extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared Errno' +extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared Errno' extras='' fflushNULL='define' fflushall='undef' @@ -751,7 +751,7 @@ issymlink='/usr/bin/test -h' ivdformat='"ld"' ivsize='4' ivtype='long' -known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared' +known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared' ksh='' ld='cc' lddlflags='-shared -L/usr/local/lib' diff --git a/Cross/config.sh-arm-linux-n770 b/Cross/config.sh-arm-linux-n770 index 4461b93..6c2fd8f 100644 --- a/Cross/config.sh-arm-linux-n770 +++ b/Cross/config.sh-arm-linux-n770 @@ -531,7 +531,7 @@ dlsrc='dl_dlopen.xs' doublesize='8' drand01='drand48()' drand48_r_proto='0' -dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared' +dynamic_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared' eagain='EAGAIN' ebcdic='undef' echo='echo' @@ -546,7 +546,7 @@ endservent_r_proto='0' eunicefix=':' exe_ext='' expr='expr' -extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared Errno' +extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared Errno' extras='' fflushNULL='define' fflushall='undef' @@ -736,7 +736,7 @@ issymlink='/usr/bin/test -h' ivdformat='"ld"' ivsize='4' ivtype='long' -known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared' +known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared' ksh='' ld='arm-none-linux-gnueabi-gcc' lddlflags='-shared -L/usr/local/lib' diff --git a/MANIFEST b/MANIFEST index b44b021..e51cc33 100644 --- a/MANIFEST +++ b/MANIFEST @@ -88,6 +88,8 @@ ext/Attribute-Handlers/t/constants.t Test constants and Attribute::Handlers ext/Attribute-Handlers/t/data_convert.t Test attribute data conversion ext/Attribute-Handlers/t/linerep.t See if Attribute::Handlers works ext/Attribute-Handlers/t/multi.t See if Attribute::Handlers works +ext/attributes/attributes.pm For "sub foo : attrlist" +ext/attributes/attributes.xs For "sub foo : attrlist" ext/B/B/Concise.pm Compiler Concise backend ext/B/B/Debug.pm Compiler Debug backend ext/B/B/Deparse.pm Compiler Deparse backend @@ -1768,7 +1770,6 @@ lib/Archive/Tar/t/src/short/bar.tar.packed Archive::Tar tests lib/Archive/Tar/t/src/short/foo.tbz.packed Archive::Tar tests lib/Archive/Tar/t/src/short/foo.tgz.packed Archive::Tar tests lib/assert.pl assertion and panic with stack trace -lib/attributes.pm For "sub foo : attrlist" lib/autodie/exception.pm Exception class for autodie lib/autodie/exception/system.pm Exception class for autodying system() lib/autodie.pm Functions suceed or die with lexical scope @@ -4522,4 +4523,3 @@ x2p/util.c Utility routines x2p/util.h Public declarations for the above x2p/walk.c Parse tree walker XSUB.h Include file for extension subroutines -xsutils.c Additional bundled package methods not in UNIVERSAL:: diff --git a/Makefile.SH b/Makefile.SH index 0b80039..dd4ea3f 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -439,7 +439,7 @@ h = $(h1) $(h2) $(h3) $(h4) $(h5) c1 = av.c scope.c op.c doop.c doio.c dump.c gv.c hv.c mg.c reentr.c mro.c perl.c c2 = perly.c pp.c pp_hot.c pp_ctl.c pp_sys.c regcomp.c regexec.c utf8.c sv.c -c3 = taint.c toke.c util.c deb.c run.c universal.c xsutils.c pad.c globals.c +c3 = taint.c toke.c util.c deb.c run.c universal.c pad.c globals.c c4 = perlio.c perlapi.c numeric.c mathoms.c locale.c pp_pack.c pp_sort.c c5 = $(madlysrc) $(mallocsrc) @@ -448,7 +448,7 @@ c = $(c1) $(c2) $(c3) $(c4) $(c5) miniperlmain.c perlmain.c opmini.c perlmini.c obj0 = op$(OBJ_EXT) perl$(OBJ_EXT) obj1 = $(madlyobj) $(mallocobj) gv$(OBJ_EXT) toke$(OBJ_EXT) perly$(OBJ_EXT) pad$(OBJ_EXT) regcomp$(OBJ_EXT) dump$(OBJ_EXT) util$(OBJ_EXT) mg$(OBJ_EXT) reentr$(OBJ_EXT) mro$(OBJ_EXT) obj2 = hv$(OBJ_EXT) av$(OBJ_EXT) run$(OBJ_EXT) pp_hot$(OBJ_EXT) sv$(OBJ_EXT) pp$(OBJ_EXT) scope$(OBJ_EXT) pp_ctl$(OBJ_EXT) pp_sys$(OBJ_EXT) -obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) xsutils$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) +obj3 = doop$(OBJ_EXT) doio$(OBJ_EXT) regexec$(OBJ_EXT) utf8$(OBJ_EXT) taint$(OBJ_EXT) deb$(OBJ_EXT) universal$(OBJ_EXT) globals$(OBJ_EXT) perlio$(OBJ_EXT) perlapi$(OBJ_EXT) numeric$(OBJ_EXT) mathoms$(OBJ_EXT) locale$(OBJ_EXT) pp_pack$(OBJ_EXT) pp_sort$(OBJ_EXT) mini_obj = $(obj1) $(obj2) $(obj3) $(ARCHOBJS) ndt_obj = $(obj0) $(obj1) $(obj2) $(obj3) $(ARCHOBJS) diff --git a/Makefile.micro b/Makefile.micro index 39b8c3d..8611332 100644 --- a/Makefile.micro +++ b/Makefile.micro @@ -21,7 +21,7 @@ O = uav$(_O) udeb$(_O) udoio$(_O) udoop$(_O) udump$(_O) \ uregcomp$(_O) uregexec$(_O) urun$(_O) \ uscope$(_O) usv$(_O) utaint$(_O) utoke$(_O) \ unumeric$(_O) ulocale$(_O) umathoms$(_O) \ - uuniversal$(_O) uutf8$(_O) uutil$(_O) uperlapi$(_O) uxsutils$(_O) + uuniversal$(_O) uutf8$(_O) uutil$(_O) uperlapi$(_O) microperl: $(O) $(LD) -o $@ $(O) $(LDFLAGS) $(LIBS) @@ -170,9 +170,6 @@ uutil$(_O): $(HE) util.c uperlapi$(_O): $(HE) perlapi.c perlapi.h $(CC) $(CCFLAGS) -o $@ $(CFLAGS) perlapi.c -uxsutils$(_O): $(HE) xsutils.c - $(CC) $(CCFLAGS) -o $@ $(CFLAGS) xsutils.c - uudmap.h: generate_uudmap$(_X) $(RUN) ./generate_uudmap$(_X) >uudmap.h diff --git a/NetWare/Makefile b/NetWare/Makefile index 6a5b2ac..f221616 100644 --- a/NetWare/Makefile +++ b/NetWare/Makefile @@ -312,6 +312,7 @@ IO_NLM = $(AUTODIR)\IO\IO.NLM OPCODE_NLM = $(AUTODIR)\Opcode\Opcode.NLM SDBM_FILE_NLM = $(AUTODIR)\SDBM_File\SDBM_File.NLM POSIX_NLM = $(AUTODIR)\POSIX\POSIX.NLM +ATTRIBUTES_NLM = $(AUTODIR)\attributes\attributes.NLM B_NLM = $(AUTODIR)\B\B.NLM DUMPER_NLM = $(AUTODIR)\Data\Dumper\Dumper.NLM PEEK_NLM = $(AUTODIR)\Devel\Peek\Peek.NLM @@ -335,6 +336,7 @@ EXTENSION_NLM = \ $(SOCKET_NLM) \ $(OPCODE_NLM) \ $(B_NLM) \ + $(ATTRIBUTES_NLM) \ $(SDBM_FILE_NLM) \ $(POSIX_NLM) \ $(DUMPER_NLM) \ @@ -722,8 +724,7 @@ MICROCORE_SRC = \ ..\toke.c \ ..\universal.c \ ..\utf8.c \ - ..\util.c \ - ..\xsutils.c + ..\util.c #EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c @@ -786,7 +787,7 @@ CORE_H = $(CORE_NOCFG_H) .\config.h DLL_OBJ = $(DLL_SRC:.c=.obj) X2P_OBJ = $(X2P_SRC:.c=.obj) -DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX B re \ +DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attributes B re \ Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \ Storable/Storable List/Util MIME/Base64/Base64 XS/APItest/APItest \ XS/Typemap/Typemap Unicode/Normalize/Normalize Sys/Hostname @@ -801,6 +802,7 @@ OPCODE = $(EXTDIR)\Opcode\Opcode SDBM_FILE = $(EXTDIR)\SDBM_File\SDBM_File IO = $(EXTDIR)\IO\IO POSIX = $(EXTDIR)\POSIX\POSIX +ATTRIBUTES = $(EXTDIR)\attributes\attributes B = $(EXTDIR)\B\B RE = $(EXTDIR)\re\re DUMPER = $(EXTDIR)\Data\Dumper\Dumper @@ -827,6 +829,7 @@ EXTENSION_C = \ $(SDBM_FILE).c \ $(IO).c \ $(POSIX).c \ + $(ATTRIBUTES).c \ $(RE).c \ $(DUMPER).c \ $(PEEK).c \ @@ -1222,6 +1225,12 @@ $(POSIX_NLM): $(MAKE) cd ..\..\netware +$(ATTRIBUTES_NLM): + cd $(EXTDIR)\$(*B) + ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl + $(MAKE) + cd ..\..\netware + $(SDBM_FILE_NLM): cd $(EXTDIR)\$(*B) ..\..\miniperl -I..\..\lib Makefile.PL PERL_CORE=1 INSTALLDIRS=perl @@ -1387,7 +1396,7 @@ distclean: clean nwclean -del /f /q $(EXTDIR)\DynaLoader\dl_win32.xs -del /f /q $(EXTDIR)\DynaLoader\DynaLoader.pm -del /f /q $(EXTDIR)\DynaLoader\XSLoader.pm - -del /f /q $(LIBDIR)\.exists $(LIBDIR)\DynaLoader.pm + -del /f /q $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm -del /f /q $(LIBDIR)\XSLoader.pm -del /f /q $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm -del /f /q $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm diff --git a/NetWare/config.wc b/NetWare/config.wc index 93fbb15..533a59f 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -538,7 +538,7 @@ doublesize='8' drand01='(rand()/(double)((unsigned)1< 2 && ref $_[2] or do { require Exporter; @@ -73,8 +63,8 @@ sub get ($) { @_ == 1 && ref $_[0] or croak 'Usage: '.__PACKAGE__.'::get $ref'; my $svref = shift; - my $svtype = uc reftype $svref; - my $stash = _guess_stash $svref; + my $svtype = uc reftype($svref); + my $stash = _guess_stash($svref); $stash = caller unless defined $stash; my $pkgmeth; $pkgmeth = UNIVERSAL::can($stash, "FETCH_${svtype}_ATTRIBUTES") @@ -87,6 +77,9 @@ sub get ($) { sub require_version { goto &UNIVERSAL::VERSION } +require XSLoader; +XSLoader::load('attributes', $VERSION); + 1; __END__ #The POD goes here @@ -479,4 +472,3 @@ which this module replaces; L for details on the normal invocation mechanism. =cut - diff --git a/xsutils.c b/ext/attributes/attributes.xs similarity index 74% rename from xsutils.c rename to ext/attributes/attributes.xs index baf3858..35ded7b 100644 --- a/xsutils.c +++ b/ext/attributes/attributes.xs @@ -17,43 +17,13 @@ #include "EXTERN.h" -#define PERL_IN_XSUTILS_C #include "perl.h" +#include "XSUB.h" /* * Contributed by Spider Boardman (spider.boardman@orb.nashua.nh.us). */ -/* package attributes; */ -PERL_XS_EXPORT_C void XS_attributes_reftype(pTHX_ CV *cv); -PERL_XS_EXPORT_C void XS_attributes__modify_attrs(pTHX_ CV *cv); -PERL_XS_EXPORT_C void XS_attributes__guess_stash(pTHX_ CV *cv); -PERL_XS_EXPORT_C void XS_attributes__fetch_attrs(pTHX_ CV *cv); -PERL_XS_EXPORT_C void XS_attributes_bootstrap(pTHX_ CV *cv); - - -/* - * Note that only ${pkg}::bootstrap definitions should go here. - * This helps keep down the start-up time, which is especially - * relevant for users who don't invoke any features which are - * (partially) implemented here. - * - * The various bootstrap definitions can take care of doing - * package-specific newXS() calls. Since the layout of the - * bundled *.pm files is in a version-specific directory, - * version checks in these bootstrap calls are optional. - */ - -static const char file[] = __FILE__; - -void -Perl_boot_core_xsutils(pTHX) -{ - newXS("attributes::bootstrap", XS_attributes_bootstrap, file); -} - -#include "XSUB.h" - static int modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) { @@ -142,31 +112,13 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs) return nret; } +MODULE = attributes PACKAGE = attributes - -/* package attributes; */ - -XS(XS_attributes_bootstrap) -{ - dVAR; - dXSARGS; - - if( items > 1 ) - croak_xs_usage(cv, "$module"); - - newXS("attributes::_modify_attrs", XS_attributes__modify_attrs, file); - newXSproto("attributes::_guess_stash", XS_attributes__guess_stash, file, "$"); - newXSproto("attributes::_fetch_attrs", XS_attributes__fetch_attrs, file, "$"); - newXSproto("attributes::reftype", XS_attributes_reftype, file, "$"); - - XSRETURN(0); -} - -XS(XS_attributes__modify_attrs) -{ - dVAR; - dXSARGS; +void +_modify_attrs(...) + PREINIT: SV *rv, *sv; + PPCODE: if (items < 1) { usage: @@ -181,22 +133,19 @@ usage: XSRETURN(modify_SV_attributes(aTHX_ sv, &ST(0), &ST(1), items-1)); XSRETURN(0); -} -XS(XS_attributes__fetch_attrs) -{ - dVAR; - dXSARGS; +void +_fetch_attrs(...) + PREINIT: SV *rv, *sv; cv_flags_t cvflags; - + PPCODE: if (items != 1) { usage: croak_xs_usage(cv, "$reference"); } rv = ST(0); - SP -= items; if (!(SvOK(rv) && SvROK(rv))) goto usage; sv = SvRV(rv); @@ -222,15 +171,13 @@ usage: } PUTBACK; -} -XS(XS_attributes__guess_stash) -{ - dVAR; - dXSARGS; +void +_guess_stash(...) + PREINIT: SV *rv, *sv; dXSTARG; - + PPCODE: if (items != 1) { usage: croak_xs_usage(cv, "$reference"); @@ -270,15 +217,13 @@ usage: SvSETMAGIC(TARG); XSRETURN(1); -} -XS(XS_attributes_reftype) -{ - dVAR; - dXSARGS; +void +reftype(...) + PREINIT: SV *rv, *sv; dXSTARG; - + PPCODE: if (items != 1) { usage: croak_xs_usage(cv, "$reference"); @@ -294,8 +239,6 @@ usage: SvSETMAGIC(TARG); XSRETURN(1); -} - /* * Local variables: * c-indentation-style: bsd @@ -304,4 +247,4 @@ usage: * End: * * ex: set ts=8 sts=4 sw=4 noet: - */ + */ \ No newline at end of file diff --git a/hints/uwin.sh b/hints/uwin.sh index 64357c2..5e50179 100644 --- a/hints/uwin.sh +++ b/hints/uwin.sh @@ -32,7 +32,7 @@ #b # compile/link flags #b ldflags=-g #b optimize=-g -#b static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::scalar POSIX SDBM_File Socket Storable Unicode::Normalize re" +#b static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter::Util::Call IO IPC/SysV MIME::Base64 Opcode PerlIO::scalar POSIX SDBM_File Socket Storable Unicode::Normalize attributes re" #b #static_ext=none #b # dynamic loading needs work #b usedl=undef @@ -109,7 +109,7 @@ optimize=-g # Original, with :: separators, cause make to choke. # No longer seems to be necessary at all. -# static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter/Util/Call IO IPC/SysV MIME/Base64 Opcode PerlIO/scalar POSIX SDBM_File Socket Storable Unicode/Normalize re" +# static_ext="B Data/Dumper Digest/MD5 Errno Fcntl Filter/Util/Call IO IPC/SysV MIME/Base64 Opcode PerlIO/scalar POSIX SDBM_File Socket Storable Unicode/Normalize attributes re" # perl malloc will not work usemymalloc=n diff --git a/hints/vmesa.sh b/hints/vmesa.sh index 27ab123..430ded9 100644 --- a/hints/vmesa.sh +++ b/hints/vmesa.sh @@ -322,7 +322,7 @@ sig_num_init='0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,2 sizetype='size_t' so='.a' ssizetype='ssize_t' -static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Time/HiRes Time/Piece re' +static_ext='Data/Dumper Digest/MD5 Fcntl Filter/Util/Call GDBM_File IO IPC/SysV List/Util MIME/Base64 NDBM_File Opcode PerlIO/scalar POSIX Socket Storable Time/HiRes Time/Piece attributes re' stdchar='char' stdio_cnt='(fp)->__countIn' stdio_ptr='(fp)->__bufPtr' diff --git a/perl.c b/perl.c index 32c0a48..701b010 100644 --- a/perl.c +++ b/perl.c @@ -2028,7 +2028,6 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) boot_core_PerlIO(); boot_core_UNIVERSAL(); - boot_core_xsutils(); boot_core_mro(); if (xsinit) diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index 2228c61..eda91c1 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -560,7 +560,7 @@ endservent_r_proto='0' eunicefix=':' exe_ext='' expr='expr' -extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode Errno' +extensions='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize attributes re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode Errno' extras='' fflushNULL='define' fflushall='undef' @@ -733,7 +733,7 @@ issymlink='/bin/test -h' ivdformat='"ld"' ivsize='4' ivtype='long' -known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap re threads threads/shared' +known_extensions='B ByteLoader Cwd DB_File Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call GDBM_File I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize XS/APItest XS/Typemap attributes re threads threads/shared' ksh='' ld='ld' lddlflags='' @@ -933,7 +933,7 @@ src='.' ssizetype='ssize_t' startperl='#!/bin/perl' startsh='#!/bin/sh' -static_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode' +static_ext='B ByteLoader Cwd Data/Dumper Devel/DProf Devel/PPPort Devel/Peek Digest/MD5 Encode Fcntl File/Glob Filter/Util/Call IO List/Util MIME/Base64 Opcode POSIX PerlIO/encoding PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Time/HiRes Unicode/Normalize attributes re threads threads/shared Encode/Byte Encode/CN Encode/EBCDIC Encode/JP Encode/KR Encode/Symbol Encode/TW Encode/Unicode' stdchar='char' stdio_base='((fp)->_base)' stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)' diff --git a/plan9/mkfile b/plan9/mkfile index 54ea5a8..47866d5 100644 --- a/plan9/mkfile +++ b/plan9/mkfile @@ -35,7 +35,7 @@ ext_xs = IO.xs Socket.xs Opcode.xs dl_none.xs Fcntl.xs POSIX.xs ext_c = ${ext_xs:%.xs=%.c} ext_obj = ${ext_xs:%.xs=%.$O} -obj = av.$O deb.$O doio.$O doop.$O dump.$O globals.$O gv.$O hv.$O locale.$O malloc.$O mathoms.$O mg.$O numeric.$O op.$O pad.$O perlapi.$O perlio.$O perly.$O pp.$O pp_ctl.$O pp_hot.$O pp_pack.$O pp_sort.$O pp_sys.$O reentr.$O regcomp.$O regexec.$O run.$O scope.$O sv.$O taint.$O toke.$O universal.$O utf8.$O util.$O xsutils.$O +obj = av.$O deb.$O doio.$O doop.$O dump.$O globals.$O gv.$O hv.$O locale.$O malloc.$O mathoms.$O mg.$O numeric.$O op.$O pad.$O perlapi.$O perlio.$O perly.$O pp.$O pp_ctl.$O pp_hot.$O pp_pack.$O pp_sort.$O pp_sys.$O reentr.$O regcomp.$O regexec.$O run.$O scope.$O sv.$O taint.$O toke.$O universal.$O utf8.$O util.$O OBJS = perl.$O plan9.$O $obj diff --git a/proto.h b/proto.h index 552b9f6..520b6fa 100644 --- a/proto.h +++ b/proto.h @@ -4028,7 +4028,6 @@ PERL_CALLCONV OP * Perl_my_attrs(pTHX_ OP *o, OP *attrs) #define PERL_ARGS_ASSERT_MY_ATTRS \ assert(o) -PERL_CALLCONV void Perl_boot_core_xsutils(pTHX); #if defined(USE_ITHREADS) PERL_CALLCONV PERL_CONTEXT* Perl_cx_dup(pTHX_ PERL_CONTEXT* cx, I32 ix, I32 max, CLONE_PARAMS* param) __attribute__warn_unused_result__ diff --git a/symbian/config.pl b/symbian/config.pl index 09c316f..22a42c4 100644 --- a/symbian/config.pl +++ b/symbian/config.pl @@ -717,7 +717,7 @@ perl${VERSION}lib.sis perllib.sis: \$(PM) perl${VERSION}ext.sis perlext.sis: perldll_arm buildext_sis perl symbian\\makesis.pl perl${VERSION}ext -EXT = Compress::Raw::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader +EXT = Compress::Raw::Zlib Cwd Data::Dumper Devel::Peek Digest::MD5 Errno Fcntl File::Glob Filter::Util::Call IO List::Util MIME::Base64 PerlIO::scalar PerlIO::via SDBM_File Socket Storable Time::HiRes XSLoader attributes buildext: perldll symbian\\xsbuild.pl lib\\Config.pm perl \$(XLIB) symbian\\xsbuild.pl \$(XSBOPT) \$(EXT) diff --git a/symbian/install.cfg b/symbian/install.cfg index cdfe80a..4b86b82 100644 --- a/symbian/install.cfg +++ b/symbian/install.cfg @@ -69,6 +69,7 @@ lib warnings/register.pm # # Extensions. # +ext attributes ext Compress/Raw/Zlib -zlib-src ext Cwd ext Data/Dumper diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template index 6595a31..b8ea2c1 100644 --- a/vms/descrip_mms.template +++ b/vms/descrip_mms.template @@ -281,14 +281,14 @@ FULLLIBS2 = $(LIBS2)|$(THRLIBS1)|$(THRLIBS2) c0 = $(MALLOC_C) $(SOCKC) av.c deb.c doio.c doop.c dump.c globals.c gv.c hv.c mro.c c1 = mg.c locale.c mathoms.c miniperlmain.c numeric.c op.c pad.c perl.c perlapi.c perlio.c c2 = perly.c pp.c pp_ctl.c pp_hot.c pp_pack.c pp_sort.c pp_sys.c regcomp.c regexec.c reentr.c -c3 = run.c scope.c sv.c taint.c toke.c universal.c utf8.c util.c vms.c xsutils.c +c3 = run.c scope.c sv.c taint.c toke.c universal.c utf8.c util.c vms.c c = $(c0) $(c1) $(c2) $(c3) obj0 = perl$(O) obj1 = $(MALLOC_O) $(SOCKO) av$(O) deb$(O) doio$(O) doop$(O) dump$(O) mro$(O) globals$(O) gv$(O) hv$(O) obj2 = locale$(O) mathoms$(O) mg$(O) miniperlmain$(O) numeric$(O) op$(O) pad$(O) perlapi$(O) perlio$(O) obj3 = perly$(O) pp$(O) pp_ctl$(O) pp_hot$(O) reentr$(O) pp_pack$(O) pp_sort$(O) pp_sys$(O) regcomp$(O) -obj4 = regexec$(O) run$(O) scope$(O) sv$(O) taint$(O) toke$(O) universal$(O) utf8$(O) util$(O) vms$(O) xsutils$(O) +obj4 = regexec$(O) run$(O) scope$(O) sv$(O) taint$(O) toke$(O) universal$(O) utf8$(O) util$(O) vms$(O) mini_obj = perlmini$(O) $(obj1) $(obj2) $(obj3) $(obj4) obj = $(obj0) $(obj1) $(obj2) $(obj3) $(obj4) @@ -1743,8 +1743,6 @@ util$(O) : util.c $(h) $(CC) $(CORECFLAGS) $(MMS$SOURCE) vms$(O) : vms.c $(h) $(CC) $(CORECFLAGS) $(MMS$SOURCE) -xsutils$(O) : xsutils.c $(h) - $(CC) $(CORECFLAGS) $(MMS$SOURCE) [.x2p]hash$(O) : [.x2p]hash.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h vmsish.h $(SOCKH) $(CC) $(X2PCFLAGS) $(MMS$SOURCE) diff --git a/win32/Makefile b/win32/Makefile index a724482..3de30cb 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -688,8 +688,7 @@ MICROCORE_SRC = \ ..\toke.c \ ..\universal.c \ ..\utf8.c \ - ..\util.c \ - ..\xsutils.c + ..\util.c EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c @@ -1154,7 +1153,7 @@ distclean: realclean -del /f $(EXTDIR)\DynaLoader\XSLoader.pm -del /f $(LIBDIR)\Encode.pm $(LIBDIR)\encoding.pm $(LIBDIR)\Errno.pm -del /f $(LIBDIR)\Config.pod $(LIBDIR)\POSIX.pod $(LIBDIR)\threads.pm - -del /f $(LIBDIR)\.exists $(LIBDIR)\DynaLoader.pm + -del /f $(LIBDIR)\.exists $(LIBDIR)\attributes.pm $(LIBDIR)\DynaLoader.pm -del /f $(LIBDIR)\XSLoader.pm $(LIBDIR)\lib.pm -del /f $(LIBDIR)\Fcntl.pm $(LIBDIR)\IO.pm $(LIBDIR)\Opcode.pm -del /f $(LIBDIR)\ops.pm $(LIBDIR)\Safe.pm diff --git a/win32/Makefile.ce b/win32/Makefile.ce index cb96f33..7b5c2bc 100644 --- a/win32/Makefile.ce +++ b/win32/Makefile.ce @@ -593,8 +593,7 @@ MICROCORE_SRC = \ ..\toke.c \ ..\universal.c \ ..\utf8.c \ - ..\util.c \ - ..\xsutils.c + ..\util.c EXTRACORE_SRC = $(EXTRACORE_SRC) perllib.c @@ -654,7 +653,7 @@ CORE_NOCFG_H = \ .\include\sys\socket.h \ .\win32.h -DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX B re \ +DYNAMIC_EXT = Socket IO Fcntl Opcode SDBM_File POSIX attributes B re \ Data/Dumper Devel/Peek ByteLoader Devel/DProf File/Glob \ Sys/Hostname @@ -822,7 +821,6 @@ $(DLLDIR)\win32thread.obj \ $(DLLDIR)\wince.obj \ $(DLLDIR)\win32io.obj \ $(DLLDIR)\wincesck.obj \ -$(DLLDIR)\xsutils.obj \ $(DLLDIR)\perllib.obj \ $(DLLDIR)\DynaLoader.obj !IF "$(PERL_MALLOC)" == "define" diff --git a/win32/config.bc b/win32/config.bc index 37cc9c6..6743f14 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -534,7 +534,7 @@ doublesize='8' drand01='(rand()/(double)((unsigned)1<