summaryrefslogtreecommitdiff
path: root/regexp.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2015-05-10 23:30:21 -0400
committerTony Cook <tony@develop-help.com>2015-06-03 11:48:36 +1000
commitfc6bde6fcee5810d400f6080fe2039469c4d2ad3 (patch)
tree9d7601abffcc807c5d6c90f899e61b48dd8983f4 /regexp.h
parent87d9837674dfb6ff391470e04bc610a6c11f58f2 (diff)
downloadperl-fc6bde6fcee5810d400f6080fe2039469c4d2ad3.tar.gz
remove redundant PERL_EXPORT_C and PERL_XS_EXPORT_C macros
These 2 macros were created for the Symbian port in commit "Symbian port of Perl" to replace a direct "extern" token. I guess the author was unaware of PERL_CALLCONV. PERL_CALLCONV is the official macro to use. PERL_XS_EXPORT_C and PERL_EXPORT_C have no usage on cpan grep except for modules with direct copies of core headers. A defect of using PERL_EXPORT_C and PERL_XS_EXPORT_C instead of PERL_CALLCONV is that win32/win32.h has no knowledge of the 2 macros and doesn't set them, and os/os2ish.h doesn't either. On Win32, since the unix defaults are used instead of Win32 specific "__declspec(dllimport)" token, XS modules use indirect function stubs in each XS module placed by the CC to call into perl5**.dll instead of directly calls the core C functions. I observed this in in XS-Typemap's DLL. To simplify the API, and to decrease the amount of macros needing to implemented to support each platform, just remove the 2 macros. Since perl.h's fallback defaults for PERL_CALLCONV are very late in perl.h, they need to be moved up before function declarations start in perlio.h (perlio.h is included from iperlsys.h). win32iop.h contains the "PerlIO" and SV" tokens, so perlio.h must be included before win32iop.h is. Including perlio.h so early in win32.h, causes PERL_CALLCONV not be defined since Win32 platform uses the fallback in perl.h, since win32.h doesn't always define PERL_CALLCONV and sometimes relies on the fallback. Since win32iop.h contains alot of declarations, it belongs with other declarations such as those in proto.h so move it from win32.h to perl.h. the "free" token in struct regexp_engine conflicts with win32iop's "#define free win32_free" so rename that member.
Diffstat (limited to 'regexp.h')
-rw-r--r--regexp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexp.h b/regexp.h
index 04eeba9c9e..4e94213b6e 100644
--- a/regexp.h
+++ b/regexp.h
@@ -168,7 +168,7 @@ typedef struct regexp_engine {
const U32 flags,
re_scream_pos_data *data);
SV* (*checkstr) (pTHX_ REGEXP * const rx);
- void (*free) (pTHX_ REGEXP * const rx);
+ void (*rxfree) (pTHX_ REGEXP * const rx);
void (*numbered_buff_FETCH) (pTHX_ REGEXP * const rx, const I32 paren,
SV * const sv);
void (*numbered_buff_STORE) (pTHX_ REGEXP * const rx, const I32 paren,