diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-12 01:55:15 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-12 01:55:15 +0000 |
commit | c5be433b5c5658093bc9cae4434721a0b63e7a85 (patch) | |
tree | b5e25d83702fd5b6ebb6108c8cdf104a09f97040 /perlapi.h | |
parent | ed7ab888f26e9b2a3bcf98806b630e993179f8b4 (diff) | |
download | perl-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 'perlapi.h')
-rwxr-xr-x | perlapi.h | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -3,21 +3,30 @@ perlvars.h and thrdvar.h. Any changes made here will be lost! */ -#if defined(PERL_OBJECT) - /* declare accessor functions for Perl variables */ +#if defined(PERL_OBJECT) || defined (PERL_CAPI) + +#if defined(PERL_OBJECT) +# undef aTHXo +# define aTHXo pPerl +# undef aTHXo_ +# define aTHXo_ aTHXo, +# undef _aTHXo +# define _aTHXo ,aTHXo +#endif /* PERL_OBJECT */ + START_EXTERN_C #undef PERLVAR #undef PERLVARA #undef PERLVARI #undef PERLVARIC -#define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(void *p); +#define PERLVAR(v,t) EXTERN_C t* Perl_##v##_ptr(pTHXo); #define PERLVARA(v,n,t) typedef t PL_##v##_t[n]; \ - EXTERN_C PL_##v##_t* Perl_##v##_ptr(void *p); + EXTERN_C PL_##v##_t* Perl_##v##_ptr(pTHXo); #define PERLVARI(v,t,i) PERLVAR(v,t) -#define PERLVARIC(v,t,i) PERLVAR(v,t) +#define PERLVARIC(v,t,i) PERLVAR(v, const t) #include "thrdvar.h" #include "intrpvar.h" @@ -30,5 +39,5 @@ START_EXTERN_C END_EXTERN_C -#endif /* PERL_OBJECT */ +#endif /* PERL_OBJECT || PERL_CAPI */ |