summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2014-11-13 01:59:06 -0500
committerFather Chrysostomos <sprout@cpan.org>2014-11-13 04:41:46 -0800
commit9a18979311347ab1c45e2ef16113bb5abe4cbd26 (patch)
tree22590b8dffe9c4de5f1bf101111d04690033aea1 /proto.h
parented6401c5fdd50fe275e7ed0d9af99dff6ec7c1fb (diff)
downloadperl-9a18979311347ab1c45e2ef16113bb5abe4cbd26.tar.gz
add filename handling to xs handshake
- this improves the error message on ABI incompatibility, per [perl #123136] - reduce the number of gv_fetchfile calls in newXS over registering many XSUBs - "v" was not stripped from PERL_API_VERSION_STRING since string "vX.XX.X\0", a typical version number is 8 bytes long, and aligned to 4/8 by most compilers in an image. A double digit maint release is extremely unlikely. - newXS_deffile saves on machine code in bootstrap functions by not passing arg filename - move newXS to where the rest of the newXS*()s live - move the "no address" panic closer to the start to get it out of the way sooner flow wise (it nothing to do with var gv or cv) - move CvANON_on to not check var name twice - change die message to use %p, more efficient on 32 ptr/64 IV platforms see ML post "about commit "util.c: fix comiler warnings"" - vars cv/xs_spp (stack pointer pointer)/xs_interp exist for inspection by a C debugger in an unoptimized build
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/proto.h b/proto.h
index 6d020121c9..4e36949468 100644
--- a/proto.h
+++ b/proto.h
@@ -3115,6 +3115,12 @@ PERL_CALLCONV CV* Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const c
#define PERL_ARGS_ASSERT_NEWXS \
assert(subaddr); assert(filename)
+PERL_CALLCONV CV * Perl_newXS_deffile(pTHX_ const char *name, XSUBADDR_t subaddr)
+ __attribute__nonnull__(pTHX_1)
+ __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_NEWXS_DEFFILE \
+ assert(name); assert(subaddr)
+
PERL_CALLCONV CV * Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr, const char *const filename, const char *const proto, U32 flags)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
@@ -3122,10 +3128,9 @@ PERL_CALLCONV CV * Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr,
assert(subaddr); assert(filename)
PERL_CALLCONV CV * Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags)
- __attribute__nonnull__(pTHX_3)
- __attribute__nonnull__(pTHX_4);
+ __attribute__nonnull__(pTHX_3);
#define PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS \
- assert(subaddr); assert(filename)
+ assert(subaddr)
PERL_CALLCONV void Perl_new_collate(pTHX_ const char* newcoll);
PERL_CALLCONV void Perl_new_ctype(pTHX_ const char* newctype)
@@ -5161,10 +5166,11 @@ PERL_CALLCONV void Perl_write_to_stderr(pTHX_ SV* msv)
assert(msv)
PERL_CALLCONV void Perl_xs_boot_epilog(pTHX_ const U32 ax);
-PERL_CALLCONV I32 Perl_xs_handshake(const U32 key, void * v_my_perl, ...)
- __attribute__nonnull__(2);
+PERL_CALLCONV I32 Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
#define PERL_ARGS_ASSERT_XS_HANDSHAKE \
- assert(v_my_perl)
+ assert(v_my_perl); assert(file)
PERL_CALLCONV void Perl_xs_version_bootcheck(pTHX_ U32 items, U32 ax, const char *xs_p, STRLEN xs_len)
__attribute__nonnull__(pTHX_3);