summaryrefslogtreecommitdiff
path: root/XSUB.h
Commit message (Collapse)AuthorAgeFilesLines
* static and dllexport don't belong together on cygwinTony Cook2011-12-011-1/+1
| | | | | | This was causing build errors like: Cwd.c:553:1: error: external linkage required for symbol ‘XS_Cwd_getcwd’ because of ‘dllexport’ attribute
* Revert back to making XS(name) expose XSUB symbolsSteffen Mueller2011-08-281-5/+5
| | | | | | | Instead, as Zefram recommended, ExtUtils::ParseXS will be patched to not export XSUB symbols by default that are generated through the module itself. As Zefram said, this has the advantage of allowing older perls to benefit from the non-exporting of symbols.
* Fix C++ build following commit ab1478f7146843f7.Nicholas Clark2011-08-211-1/+1
| | | | | | For C++, ab1478f7146843f7 inadvertently defined XS_INTERNAL as extern "C" static ... which C++ compilers rightfully choke on.
* Make XSUBs static by defaultSteffen Mueller2011-08-211-22/+15
| | | | | | | At the same time, do not include "STATIC" in XSPROTO and get rid of the XSPROTO_INTERNAL and XSPROTO_EXTERNAL macros because of that. This allows Devel::PPPort to continue doing its evil typedef'ing magic using XSPROTO.
* API to explicitly select to export XSUB symbols or notSteffen Mueller2011-08-111-7/+41
| | | | | | | | | | | | This adds a few additional macros to XSUB.h: XS_INTERNAL and XS_EXTERNAL are versions of the XS macro that explicitly use internal (static) linking or not. XSPROTO_INTERNAL and XSPROTO_EXTERNAL are the obvious equivalents for XSPROTO (which is apparently not public yet we support its use in SWIG...). The XS and XSPROTO macros themselves are not defined to not use STATIC, but this may (should?) be changed in the future.
* Abolish PL_vtbl_sig. It's been all 0s since it was added in 5.0 alpha 2.Nicholas Clark2011-06-111-1/+0
| | | | | Magic with a NULL vtable is equivalent to magic with a vtable of all 0s. On CPAN, only Apache::Peek's code for 5.005 is referencing it.
* Fix typos (spelling errors) in Perl sources.Peter J. Acklam) (via RT2011-01-071-1/+1
| | | | | | | | | # New Ticket Created by (Peter J. Acklam) # Please include the string: [perl #81904] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81904 > Signed-off-by: Abigail <abigail@abigail.be>
* Convert the implementation of XS_APIVERSION_BOOTCHECK to a function.Nicholas Clark2010-10-081-18/+1
| | | | | | The previous macro generated over .5K of object code. This is in every shared object, and is only called once. Hence this change increases the perl binary by about .5K (once), to save .5K for every XS module loaded.
* Convert the implementation of XS_VERSION_BOOTCHECK to a function from a macro.Nicholas Clark2010-10-071-37/+1
| | | | | | The macro expansion generates over 1K of object code. This is in every shared object, and is only called once. Hence this change increases the perl binary by about 1K (once), to save 1K for every XS module loaded.
* In XS_VERSION_BOOTCHECK, correct the flags argument of get_sv() to 0.Nicholas Clark2010-09-021-2/+2
| | | | It should not be FALSE, because it's a bitmap, not a boolean.
* Check API compatibility when loading xs modulesFlorian Ragwitz2010-07-261-3/+27
| | | | | | | | | | | | | This adds PL_apiversion, allowing the API version of a running interpreter to be introspected. It is used in the new XS_APIVERSION_BOOTCHECK macro, which is added to the _boot function of every XS module, to compare it against the API version the module has been compiled against. If the versions do not match, an exception is thrown. This doesn't fully prevent binary incompatible extensions to be loaded. It merely compares PERL_API_* between compile- and runtime, and does not attempt to solve the problem of identifying binary incompatible perls with the same API version (i.e. the same perl version configured with and without DEBUGGING).
* Fix leaks in XS_VERSION_BOOTCHECKFlorian Ragwitz2010-07-221-11/+23
| | | | | | | | | The SV holding XS_VERSION, and the version object created from it were leaked. Also, if the version from perl space wasn't a version object already, the one that got created leaked. Additionally, in case of an error, the two SVs returned by vstringify were leaked.
* The UNDERBAR macro should use find_rundefsv() as wellVincent Pit2010-06-031-6/+5
|
* XSUB.h is supposed to redefine fgets under PERL_IMPLICIT_SYS, but doesn't.Jan Dubois2010-04-211-0/+1
| | | | | See also http://rt.cpan.org/Public/Bug/Display.html?id=55049 with workaround in http://code.google.com/p/perl-devel-nytprof/source/detail?r=1168
* Add mingw64 supportSisyphus2009-11-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi, Using the attached patch to the blead source (as of a few hours ago), I can build perl with the following OS/compiler/make combos. On 32-bit XP: MSVC++ 7.0 / dmake (uses win32/makefile.mk) MSVC++ 7.0 / nmake (uses win32/Makefile) Borland C++ 5.5.1 / dmake mingw.org's gcc-4.3.0 / dmake mingw.org's gcc-3.4.5 / dmake mingw-w64.sf's 32-bit gcc-4.4.3 / dmake (There's a bug with that last compiler on XP. The perl it builds on XP hangs on XP, but runs ok if copied across to Vista. I think this is unrelated to the patches - probably even unrelated to perl. Without these patches perl will not even build using that last compiler.) On 64-bit Vista: 32-bit MSVC++ 7.0 / nmake (uses win32/Makefile) 32-bit MSVC++ 7.0 / dmake (uses win32/makfile.mk) 32-bit Borland C++ 5.5.1 / dmake mingw.org's 32-bit gcc-4.4.0 / dmake mingw.org's 32-bit gcc-3.4.5 / dmake mingw-w64.sf's 32-bit gcc-4.4.3 / dmake mingw-w64.sf's 64-bit gcc-4.4.3 / dmake mingw-w64.sf's 64-bit x86_64-w64-mingw32-gcc-4.4.3 / dmake 64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / dmake (uses win32/makefile.mk) 64-bit MicrosoftPlatform SDK for Windows Server 2003 R2 / nmake (uses win32/Makefile) Not all of those builds pass all tests - but where the removal of the patches still permits perl to build, the same tests still fail. That is, *nothing* is lost by including these patches - but there are significant gains. Each of the above builds was done according to the normal win32 configuration parameters - ie multi-threaded, non debug. No unusual config settings were applied. (I did build one debug perl on Vista using mingw-w64.sf's 32-bit gcc-4.4.3 and it built fine.) Please feel free to apply these patches (with or without modification) - and, yes, you're more than welcome to blame me if they cause any breakages ;-) Of course, some of those compilers (Borland, Microsoft, and the compilers from mingw.org) already build perl *without* having to apply any patches. It's just the other compilers that need the patches. The purpose of testing with Borland, Microsoft, and the mingw.org compilers is just to check that these patches don't break them. As a final check, I've done a build on my aging linux (mandrake-9.1) box, gcc-3.2.2. I built with '-des -Duselongdouble -Duse64bitint -Dusedevel'. No problem with that, either. If there's additional testing requirements please let me know, and I'll try to oblige. I believe the patch applied successfully for me - see below my sig for the output. Cheers, Rob Rob@desktop2 ~/GIT/blead $ patch -p0 <blead_diff.diff patching file dist/threads/threads.xs patching file handy.h patching file cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Win32.pm patching file op.c Hunk #1 succeeded at 5774 (offset 47 lines). patching file pp_pack.c patching file util.c Hunk #1 succeeded at 5366 (offset -28 lines). patching file win32/makefile.mk patching file win32/perlhost.h patching file win32/win32.c patching file win32/win32.h patching file README.win32 patching file XSUB.h
* [perl #57176] Including XSUB.h before perl.h gives nasty errorfawaka@gmail.com (via RT)2009-01-251-6/+0
|
* Assigning to DEFSV leaks if PL_defgv's gp_sv isn't set.Marcus Holland-Moritz2008-11-081-2/+2
| | | | | | | | | As Nicholas already noted in a FIXME, assigning to DEFSV should use GvSV instead of GvSVn. This change ensures that, at least under -DPERL_CORE, DEFSV cannot be assigned to and introduces a DEFSV_set macro to allow setting DEFSV. This fixes #53038: map leaks memory. p4raw-id: //depot/perl@34776
* Update copyright years.Nicholas Clark2008-10-251-1/+1
| | | p4raw-id: //depot/perl@34585
* Missed three sv_2mortal(newSVpvn(...))s in the headers.Nicholas Clark2008-01-031-1/+1
| | | p4raw-id: //depot/perl@32820
* SWIG uses XS() like this (in the perlrun.swg template):Abhijit Menon-Sen2007-08-101-4/+16
| | | | | | | | | | | | typedef XS(SwigPerlWrapper); typedef SwigPerlWrapper *SwigPerlWrapperPtr; This breaks if XS() includes the 'extern "C"' decoration under C++. The appended patch provides an XSPROTO() macro that could be used by SWIG instead. (Patch from Jan Dubois to fix breakage caused by #28734.) p4raw-id: //depot/perl@31697
* XSUB.h - silence MSVC6 compiler warningRobert May2007-07-251-1/+3
| | | | | | From: "Robert May" <robertmay@cpan.org> Message-ID: <54bdc7510707211829t67e8b82eo7d8e722e73c6a3b3@mail.gmail.com> p4raw-id: //depot/perl@31653
* Consting dump.cAndy Lester2007-05-251-1/+1
| | | | | Message-Id: <B46A083E-A133-4D38-9BE8-BE1EB0AAA326@petdance.com> p4raw-id: //depot/perl@31270
* Cast markstack values to I32Jan Dubois2007-04-101-2/+2
| | | | | Message-ID: <prol131i8b27re246alnhmem4mj13fcl2b@4ax.com> p4raw-id: //depot/perl@30879
* Update copyright years in .h files. Also, in .plRafael Garcia-Suarez2007-01-051-2/+2
| | | | | | files that generate .h files, so they'll be ready next time. p4raw-id: //depot/perl@29695
* 4th patch from: Marcus Holland-Moritz2007-01-041-2/+2
| | | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Introduce an SVfARG() macro for %SVf (%-p here) arguments to perl's printf p4raw-id: //depot/perl@29687
* The first three patches from:Marcus Holland-Moritz2007-01-041-2/+2
| | | | | | | | Subject: [PATCH] Cleanup SVf arguments (2nd try) Message-ID: <20070101201613.4120d9ef@r2d2> Adds (void*) casts to %-p and %p printf arguments p4raw-id: //depot/perl@29686
* Remove no longer used magic vtableRafael Garcia-Suarez2007-01-041-1/+0
| | | p4raw-id: //depot/perl@29684
* Using explicit printf-like APIs with a format of "%s" isn't the world'sNicholas Clark2006-10-181-1/+1
| | | | | most efficient idea. p4raw-id: //depot/perl@29042
* Revert change 28962 (at least until a better solution is found)Rafael Garcia-Suarez2006-10-081-0/+1
| | | p4raw-id: //depot/perl@28966
* No need to create a new magic vtable if it's all 0 pointers.Nicholas Clark2006-10-071-1/+0
| | | | | [And these are function pointers, so they're not NULL :-)] p4raw-id: //depot/perl@28962
* Re: [PATCH] Initial attempt at named captures for perls regexp engineYves Orton2006-10-071-0/+1
| | | | | Message-ID: <9b18b3110610061016x5ddce965u30d9a821f632d450@mail.gmail.com> p4raw-id: //depot/perl@28957
* Silence a bunch of Borland compiler warnings in SDBM_FileSteve Hay2006-08-251-1/+0
| | | | | (See: http://www.nntp.perl.org/group/perl.daily-build.reports/40283) p4raw-id: //depot/perl@28759
* Re: A large-ish C++ TODO (Re: [PATCH] g++ stage 1 reached)Jarkko Hietaniemi2006-08-171-1/+5
| | | | | Message-ID: <44E49649.9090307@iki.fi> p4raw-id: //depot/perl@28734
* Fix bug in DynaLoader, which has been passing a filename in dynamicNicholas Clark2006-05-021-1/+1
| | | | | | | storage to newXS() seemingly forever. This involves creating newXS_flags(), with the first flag being "arrange to copy the filename and free it at the right time". p4raw-id: //depot/perl@28063
* Change type of temporary padoff_du used in dUNDERBARMarcus Holland-Moritz2006-04-261-1/+1
| | | | | | from I32 to PADOFFSET, which is more correct (and fixes a warning in Devel::PPPort). p4raw-id: //depot/perl@27968
* Take splint into account for PERL_UNUSED_ARG (patch by Jarkko)Rafael Garcia-Suarez2006-04-031-2/+2
| | | p4raw-id: //depot/perl@27696
* Some of the MAD structures in headers, plus PL_madskills and PL_xmlfp,Nicholas Clark2006-03-071-0/+6
| | | | | | | and default definitions for the 2 variables. (Which will save a lot of conditional complilation, by instead letting the C compiler optimiser remove dead code.) p4raw-id: //depot/perl@27408
* Revert change #27295, which I thought fixed builds on Win32.Steve Peters2006-02-241-0/+1
| | | | | | Instead remove &PL_vtbl_glob from globvar.sym. p4raw-link: @27295 on //depot/perl: 3476b56103cbe13508b1fd6b46ae7b9cb6e0f7ed p4raw-id: //depot/perl@27296
* Last instance of PL_vtbl_glob removed. It was missed change #27289.Steve Peters2006-02-241-1/+0
| | | | | p4raw-link: @27289 on //depot/perl: c0c446747ad6c5bde53bc8415ca16ef77f6320f2 p4raw-id: //depot/perl@27295
* Replace direct flags tests & manipulations for SVpad_TYPED andNicholas Clark2006-02-231-1/+1
| | | | | | SVpad_OUR with macros SvPAD_TYPED(), SvPAD_OUR() etc, to abstract away the flags bits acutally used to store this information. p4raw-id: //depot/perl@27294
* Problem compiling swigged c++ code with 5.8.8Merijn Broeren2006-02-161-1/+1
| | | | | Message-ID: <20060215125148.GA12535@brugman.iloquent.nl> p4raw-id: //depot/perl@27203
* Re: [PATCH] s/Null(av|ch)/NULL/gSteven Schubiger2006-02-021-1/+1
| | | | | Message-ID: <20060202093849.GD12591@accognoscere.homeunix.org> p4raw-id: //depot/perl@27054
* Down with "warning: code has no effect"Steve Peters2005-11-191-3/+4
| | | p4raw-id: //depot/perl@26176
* another Symbian update: Alan's fault :-)Jarkko Hietaniemi2005-10-171-1/+1
| | | | | Message-ID: <B356D8F434D20B40A8CEDAEC305A1F24E7A611@esebe105.NOE.Nokia.com> p4raw-id: //depot/perl@25778
* mark cannot be const because MEXTEND() modifies it, and tkGlue.c uses MEXTEND()Jan Dubois2005-09-271-1/+1
| | | | | | From: "Jan Dubois" <jand@ActiveState.com> Message-Id: <200509270419.j8R4JtVw026876@smtp3.ActiveState.com> p4raw-id: //depot/perl@25613
* Another typo fixRafael Garcia-Suarez2005-08-011-1/+1
| | | p4raw-id: //depot/perl@25254
* The continuing adventures of Constman and Localize BoyAndy Lester2005-06-201-5/+13
| | | | | Message-ID: <20050620152237.GA5032@petdance.com> p4raw-id: //depot/perl@24913
* Lint supportAndy Lester2005-06-161-1/+21
| | | | | Message-ID: <20050616143521.GB22188@petdance.com> p4raw-id: //depot/perl@24873
* Eliminate more C<n_a>sNicholas Clark2005-06-081-2/+2
| | | p4raw-id: //depot/perl@24757
* XS_VERSION_BOOTCHECK is read only.Nicholas Clark2005-06-071-1/+1
| | | p4raw-id: //depot/perl@24724