summaryrefslogtreecommitdiff
path: root/ext/re/re.xs
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-09 18:03:01 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-09 18:03:01 +0000
commitcea2e8a9dd23747fd2b66edc86c58c64e9970321 (patch)
tree50e1ad203239e885681b4e804c46363e763ca432 /ext/re/re.xs
parentf019efd000a9017df645fb6c4cce1e7401ac9445 (diff)
downloadperl-cea2e8a9dd23747fd2b66edc86c58c64e9970321.tar.gz
more complete support for implicit thread/interpreter pointer,
enabled via -DPERL_IMPLICIT_CONTEXT (all changes are noops without that enabled): - USE_THREADS now enables PERL_IMPLICIT_CONTEXT, so dTHR is a noop; tests pass on Solaris; should be faster now! - MULTIPLICITY has been tested with and without PERL_IMPLICIT_CONTEXT on Solaris - improved function database now merged with embed.pl - everything except the varargs functions have foo(a,b,c) macros to provide compatibility - varargs functions default to compatibility variants that get the context pointer using dTHX - there should be almost no source compatibility issues as a result of all this - dl_foo.xs changes other than dl_dlopen.xs untested - still needs documentation, fixups for win32 etc Next step: migrate most non-mutex variables from perlvars.h to intrpvar.h p4raw-id: //depot/perl@3524
Diffstat (limited to 'ext/re/re.xs')
-rw-r--r--ext/re/re.xs16
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/re/re.xs b/ext/re/re.xs
index baa990d2ad..b49a110377 100644
--- a/ext/re/re.xs
+++ b/ext/re/re.xs
@@ -7,8 +7,8 @@
#include "perl.h"
#include "XSUB.h"
-extern regexp* my_regcomp (char* exp, char* xend, PMOP* pm);
-extern I32 my_regexec (regexp* prog, char* stringarg, char* strend,
+extern regexp* my_regcomp (pTHX_ char* exp, char* xend, PMOP* pm);
+extern I32 my_regexec (pTHX_ regexp* prog, char* stringarg, char* strend,
char* strbeg, I32 minend, SV* screamer,
void* data, U32 flags);
@@ -17,17 +17,17 @@ static int oldfl;
#define R_DB 512
static void
-deinstall(void)
+deinstall(pTHX)
{
dTHR;
- PL_regexecp = &regexec_flags;
- PL_regcompp = &pregcomp;
+ PL_regexecp = &Perl_regexec_flags;
+ PL_regcompp = &Perl_pregcomp;
if (!oldfl)
PL_debug &= ~R_DB;
}
static void
-install(void)
+install(pTHX)
{
dTHR;
PL_colorset = 0; /* Allow reinspection of ENV. */
@@ -41,6 +41,10 @@ MODULE = re PACKAGE = re
void
install()
+ CODE:
+ install(aTHX);
void
deinstall()
+ CODE:
+ deinstall(aTHX);