summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-07-12 01:55:15 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-07-12 01:55:15 +0000
commitc5be433b5c5658093bc9cae4434721a0b63e7a85 (patch)
treeb5e25d83702fd5b6ebb6108c8cdf104a09f97040 /ext
parented7ab888f26e9b2a3bcf98806b630e993179f8b4 (diff)
downloadperl-c5be433b5c5658093bc9cae4434721a0b63e7a85.tar.gz
yet more cleanups of the PERL_OBJECT, MULTIPLICITY and USE_THREADS
builds; passing the implicit context is unified among the three flavors; PERL_IMPLICIT_CONTEXT is auto-enabled under all three flavors (see the top of perl.h) for testing; all varargs functions foo() have a va_list-taking variant vfoo() for generating the context-free versions; the PERL_OBJECT build should now be hyper-compatible with CPAN extensions (C++ is totally out of the picture) result has only been tested on Windows TODO: write docs on the THX rationale and idiomatic usage of the Perl API p4raw-id: //depot/perl@3667
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.xs1
-rw-r--r--ext/ByteLoader/ByteLoader.xs2
-rw-r--r--ext/ByteLoader/byterun.c1
-rw-r--r--ext/Data/Dumper/Dumper.xs1
-rw-r--r--ext/Devel/Peek/Peek.xs1
-rw-r--r--ext/Fcntl/Fcntl.xs1
-rw-r--r--ext/IO/IO.xs1
-rw-r--r--ext/Opcode/Opcode.xs1
-rw-r--r--ext/POSIX/POSIX.xs5
-rw-r--r--ext/SDBM_File/SDBM_File.xs1
-rw-r--r--ext/Socket/Socket.xs2
-rw-r--r--ext/Thread/Thread.xs2
-rw-r--r--ext/attrs/attrs.xs1
-rw-r--r--ext/re/re.xs1
14 files changed, 20 insertions, 1 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 39e381d6f5..2c9a888662 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -7,6 +7,7 @@
*
*/
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/ByteLoader/ByteLoader.xs b/ext/ByteLoader/ByteLoader.xs
index 07f083843e..a3d53f69cc 100644
--- a/ext/ByteLoader/ByteLoader.xs
+++ b/ext/ByteLoader/ByteLoader.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
@@ -6,6 +7,7 @@
static void
freadpv(U32 len, void *data, XPV *pv)
{
+ dTHX;
New(666, pv->xpv_pv, len, char);
PerlIO_read((PerlIO*)data, (void*)pv->xpv_pv, len);
pv->xpv_len = len;
diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c
index 18fa4a150f..60dc98d3cc 100644
--- a/ext/ByteLoader/byterun.c
+++ b/ext/ByteLoader/byterun.c
@@ -9,6 +9,7 @@
* This file is autogenerated from bytecode.pl. Changes made here will be lost.
*/
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#define NO_XSLOCKS
diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs
index 27d128b6ea..3cbc7c5412 100644
--- a/ext/Data/Dumper/Dumper.xs
+++ b/ext/Data/Dumper/Dumper.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/Devel/Peek/Peek.xs b/ext/Devel/Peek/Peek.xs
index 016a6ebca9..df91476482 100644
--- a/ext/Devel/Peek/Peek.xs
+++ b/ext/Devel/Peek/Peek.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/Fcntl/Fcntl.xs b/ext/Fcntl/Fcntl.xs
index 2446ab77e8..bc16cc9645 100644
--- a/ext/Fcntl/Fcntl.xs
+++ b/ext/Fcntl/Fcntl.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs
index eb18f0c478..e614cffabb 100644
--- a/ext/IO/IO.xs
+++ b/ext/IO/IO.xs
@@ -4,6 +4,7 @@
* modify it under the same terms as Perl itself.
*/
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#define PERLIO_NOT_STDIO 1
#include "perl.h"
diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs
index c7d5f3ef1c..9b6e016bb8 100644
--- a/ext/Opcode/Opcode.xs
+++ b/ext/Opcode/Opcode.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index bbf9a7aade..e4433e0448 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1,11 +1,14 @@
#ifdef WIN32
#define _POSIX_
#endif
+
+#define PERL_NO_GET_CONTEXT
+
#include "EXTERN.h"
#define PERLIO_NOT_STDIO 1
#include "perl.h"
#include "XSUB.h"
-#ifdef PERL_OBJECT /* XXX _very_ temporary hacks */
+#if defined(PERL_OBJECT) || defined(PERL_CAPI)
# undef signal
# undef open
# undef setmode
diff --git a/ext/SDBM_File/SDBM_File.xs b/ext/SDBM_File/SDBM_File.xs
index c2e940bf6c..ee672ca915 100644
--- a/ext/SDBM_File/SDBM_File.xs
+++ b/ext/SDBM_File/SDBM_File.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index c09c313d99..6abc647c2f 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
@@ -68,6 +69,7 @@
static int
my_inet_aton(register const char *cp, struct in_addr *addr)
{
+ dTHX;
register U32 val;
register int base;
register char c;
diff --git a/ext/Thread/Thread.xs b/ext/Thread/Thread.xs
index 5d61941241..4043a02e57 100644
--- a/ext/Thread/Thread.xs
+++ b/ext/Thread/Thread.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
@@ -324,6 +325,7 @@ static Signal_t handle_thread_signal (int sig);
static Signal_t
handle_thread_signal(int sig)
{
+ dTHXo;
unsigned char c = (unsigned char) sig;
/*
* We're not really allowed to call fprintf in a signal handler
diff --git a/ext/attrs/attrs.xs b/ext/attrs/attrs.xs
index 4e0afb08ed..53ba5354e2 100644
--- a/ext/attrs/attrs.xs
+++ b/ext/attrs/attrs.xs
@@ -1,3 +1,4 @@
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
diff --git a/ext/re/re.xs b/ext/re/re.xs
index 10e44f76de..98ffd74e12 100644
--- a/ext/re/re.xs
+++ b/ext/re/re.xs
@@ -3,6 +3,7 @@
# define DEBUGGING
#endif
+#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"