summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Konojacki <me@xenu.pl>2021-06-04 22:05:04 +0200
committerxenu <me@xenu.pl>2021-06-09 19:32:14 +0200
commit6e512bc2beef5b8b17502db7edf50b5984776318 (patch)
treeedaaaa9d096a12cf43b5620afa8712a8951c1472
parent44e4059baf939468ae61cb63c0c2871c40147dc3 (diff)
downloadperl-6e512bc2beef5b8b17502db7edf50b5984776318.tar.gz
replace all instances of PERL_IMPLICIT_CONTEXT with MULTIPLICITY
Since the removal of PERL_OBJECT (acfe0abcedaf592fb4b9cb69ce3468308ae99d91) PERL_IMPLICIT_CONTEXT and MULTIPLICITY have been synonymous and they're being used interchangeably. To simplify the code, this commit replaces all instances of PERL_IMPLICIT_CONTEXT with MULTIPLICITY. PERL_IMPLICIT_CONTEXT will stay defined for compatibility with XS modules.
-rw-r--r--NetWare/Makefile4
-rw-r--r--XSUB.h2
-rw-r--r--deb.c2
-rw-r--r--embed.fnc4
-rw-r--r--embed.h48
-rw-r--r--embedvar.h24
-rw-r--r--ext/File-Glob/Glob.pm2
-rw-r--r--ext/File-Glob/bsd_glob.c2
-rw-r--r--intrpvar.h4
-rw-r--r--makedef.pl6
-rw-r--r--malloc.c4
-rw-r--r--mathoms.c4
-rw-r--r--op.c4
-rw-r--r--perl.c4
-rw-r--r--perl.h30
-rw-r--r--perlio.c2
-rw-r--r--perlvars.h2
-rw-r--r--pod/perldelta.pod13
-rw-r--r--pod/perlembed.pod2
-rw-r--r--pod/perlguts.pod26
-rw-r--r--pod/perlinterp.pod2
-rw-r--r--proto.h168
-rwxr-xr-xregen/embed.pl36
-rw-r--r--sv.c6
-rw-r--r--util.c32
-rw-r--r--util.h4
-rw-r--r--vms/vms.c44
-rw-r--r--vms/vmsish.h4
-rw-r--r--win32/GNUmakefile2
-rw-r--r--win32/Makefile2
30 files changed, 220 insertions, 269 deletions
diff --git a/NetWare/Makefile b/NetWare/Makefile
index 9fca5e4e1c..9f6f0b0abc 100644
--- a/NetWare/Makefile
+++ b/NetWare/Makefile
@@ -570,7 +570,7 @@ USE_MULTI = define
!ENDIF
!IF "$(USE_MULTI)" != "undef"
-BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
+BUILDOPT = $(BUILDOPT) -DMULTIPLICITY
!ENDIF
!IF "$(USE_IMP_SYS)" != "undef"
@@ -588,7 +588,7 @@ ARCHNAME = NetWare-$(PROCESSOR_ARCHITECTURE)
!ENDIF
!IF "$(USE_MULTI)" != "undef"
-ADD_BUILDOPT = $(ADD_BUILDOPT) -DPERL_IMPLICIT_CONTEXT
+ADD_BUILDOPT = $(ADD_BUILDOPT) -DMULTIPLICITY
!ENDIF
!IF "$(USE_IMP_SYS)" != "undef"
diff --git a/XSUB.h b/XSUB.h
index f0eda3f63c..c8c963d388 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -484,7 +484,7 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
# define VTBL_amagicelem &PL_vtbl_amagicelem
#endif
-#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE)
+#if defined(MULTIPLICITY) && !defined(PERL_NO_GET_CONTEXT) && !defined(PERL_CORE)
# undef aTHX
# undef aTHX_
# define aTHX PERL_GET_THX
diff --git a/deb.c b/deb.c
index e2d734135c..8410e429bd 100644
--- a/deb.c
+++ b/deb.c
@@ -24,7 +24,7 @@
#define PERL_IN_DEB_C
#include "perl.h"
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
void
Perl_deb_nocontext(const char *pat, ...)
{
diff --git a/embed.fnc b/embed.fnc
index 93801ec41f..39de72e267 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -700,7 +700,7 @@ fTpre |void |noperl_die|NN const char* pat|...
#if defined(WIN32)
Tore |void |win32_croak_not_implemented|NN const char * fname
#endif
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
AdfTrp |void |croak_nocontext|NULLOK const char* pat|...
AdfTrp |OP* |die_nocontext |NULLOK const char* pat|...
AfTp |void |deb_nocontext |NN const char* pat|...
@@ -3538,7 +3538,7 @@ pTd |bool|quadmath_format_needed|NN const char* format
: Used in mg.c, sv.c
pe |void |my_clearenv
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
Apo |void* |my_cxt_init |NN int *indexp|size_t size
#endif
#if defined(PERL_IN_UTIL_C)
diff --git a/embed.h b/embed.h
index bbd8fd207e..90a8e58564 100644
--- a/embed.h
+++ b/embed.h
@@ -89,14 +89,14 @@
#define ck_entersub_args_list(a) Perl_ck_entersub_args_list(aTHX_ a)
#define ck_entersub_args_proto(a,b,c) Perl_ck_entersub_args_proto(aTHX_ a,b,c)
#define ck_entersub_args_proto_or_list(a,b,c) Perl_ck_entersub_args_proto_or_list(aTHX_ a,b,c)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define ck_warner Perl_ck_warner
#define ck_warner_d Perl_ck_warner_d
#endif
#define clear_defarray(a,b) Perl_clear_defarray(aTHX_ a,b)
#define cop_fetch_label(a,b,c) Perl_cop_fetch_label(aTHX_ a,b,c)
#define cop_store_label(a,b,c,d) Perl_cop_store_label(aTHX_ a,b,c,d)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define croak Perl_croak
#endif
#define croak_memory_wrap Perl_croak_memory_wrap
@@ -121,7 +121,7 @@
#define cv_undef(a) Perl_cv_undef(aTHX_ a)
#define cx_dump(a) Perl_cx_dump(aTHX_ a)
#define cxinc() Perl_cxinc(aTHX)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define deb Perl_deb
#endif
#define debop(a) Perl_debop(aTHX_ a)
@@ -130,7 +130,7 @@
#define debstackptrs() Perl_debstackptrs(aTHX)
#define delimcpy Perl_delimcpy
#define despatch_signals() Perl_despatch_signals(aTHX)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define die Perl_die
#endif
#define die_sv(a) Perl_die_sv(aTHX_ a)
@@ -158,7 +158,7 @@
#define dump_all() Perl_dump_all(aTHX)
#define dump_eval() Perl_dump_eval(aTHX)
#define dump_form(a) Perl_dump_form(aTHX_ a)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define dump_indent Perl_dump_indent
#endif
#define dump_packsubs(a) Perl_dump_packsubs(aTHX_ a)
@@ -178,7 +178,7 @@
#define foldEQ_latin1 Perl_foldEQ_latin1
#define foldEQ_locale Perl_foldEQ_locale
#define foldEQ_utf8_flags(a,b,c,d,e,f,g,h,i) Perl_foldEQ_utf8_flags(aTHX_ a,b,c,d,e,f,g,h,i)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define form Perl_form
#endif
#define free_tmps() Perl_free_tmps(aTHX)
@@ -296,13 +296,13 @@
#define lex_stuff_pvn(a,b,c) Perl_lex_stuff_pvn(aTHX_ a,b,c)
#define lex_stuff_sv(a,b) Perl_lex_stuff_sv(aTHX_ a,b)
#define lex_unstuff(a) Perl_lex_unstuff(aTHX_ a)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define load_module Perl_load_module
#endif
#define looks_like_number(a) Perl_looks_like_number(aTHX_ a)
#define magic_dump(a) Perl_magic_dump(aTHX_ a)
#define markstack_grow() Perl_markstack_grow(aTHX)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define mess Perl_mess
#endif
#define mess_sv(a,b) Perl_mess_sv(aTHX_ a,b)
@@ -384,7 +384,7 @@
#define newSVnv(a) Perl_newSVnv(aTHX_ a)
#define newSVpv(a,b) Perl_newSVpv(aTHX_ a,b)
#define newSVpv_share(a,b) Perl_newSVpv_share(aTHX_ a,b)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define newSVpvf Perl_newSVpvf
#endif
#define newSVpvn(a,b) Perl_newSVpvn(aTHX_ a,b)
@@ -580,7 +580,7 @@
#define sv_catpv(a,b) Perl_sv_catpv(aTHX_ a,b)
#define sv_catpv_flags(a,b,c) Perl_sv_catpv_flags(aTHX_ a,b,c)
#define sv_catpv_mg(a,b) Perl_sv_catpv_mg(aTHX_ a,b)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define sv_catpvf Perl_sv_catpvf
#define sv_catpvf_mg Perl_sv_catpvf_mg
#endif
@@ -671,7 +671,7 @@
#define sv_setpv(a,b) Perl_sv_setpv(aTHX_ a,b)
#define sv_setpv_bufsize(a,b,c) Perl_sv_setpv_bufsize(aTHX_ a,b,c)
#define sv_setpv_mg(a,b) Perl_sv_setpv_mg(aTHX_ a,b)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define sv_setpvf Perl_sv_setpvf
#define sv_setpvf_mg Perl_sv_setpvf_mg
#endif
@@ -772,11 +772,11 @@
#define vverify(a) Perl_vverify(aTHX_ a)
#define vwarn(a,b) Perl_vwarn(aTHX_ a,b)
#define vwarner(a,b,c) Perl_vwarner(aTHX_ a,b,c)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define warn Perl_warn
#endif
#define warn_sv(a) Perl_warn_sv(aTHX_ a)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define warner Perl_warner
#endif
#define whichsig_pv(a) Perl_whichsig_pv(aTHX_ a)
@@ -839,11 +839,7 @@
#define sys_intern_dup(a,b) Perl_sys_intern_dup(aTHX_ a,b)
# endif
#endif
-#if defined(MYMALLOC)
-#define dump_mstats(a) Perl_dump_mstats(aTHX_ a)
-#define get_mstats(a,b,c) Perl_get_mstats(aTHX_ a,b,c)
-#endif
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
#define croak_nocontext Perl_croak_nocontext
#define deb_nocontext Perl_deb_nocontext
#define die_nocontext Perl_die_nocontext
@@ -864,6 +860,10 @@
#define warn_nocontext Perl_warn_nocontext
#define warner_nocontext Perl_warner_nocontext
#endif
+#if defined(MYMALLOC)
+#define dump_mstats(a) Perl_dump_mstats(aTHX_ a)
+#define get_mstats(a,b,c) Perl_get_mstats(aTHX_ a,b,c)
+#endif
#if defined(PERL_USE_3ARG_SIGHANDLER)
#define csighandler Perl_csighandler
#endif
@@ -1003,7 +1003,7 @@
#define put_charclass_bitmap_innards_invlist(a,b) S_put_charclass_bitmap_innards_invlist(aTHX_ a,b)
#define put_code_point(a,b) S_put_code_point(aTHX_ a,b)
#define put_range(a,b,c,d) S_put_range(aTHX_ a,b,c,d)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define re_indentf Perl_re_indentf
#endif
#define regdump_extflags(a,b) S_regdump_extflags(aTHX_ a,b)
@@ -1013,7 +1013,7 @@
# if defined(PERL_IN_REGEXEC_C)
#define debug_start_match(a,b,c,d,e) S_debug_start_match(aTHX_ a,b,c,d,e)
#define dump_exec_pos(a,b,c,d,e,f,g) S_dump_exec_pos(aTHX_ a,b,c,d,e,f,g)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define re_exec_indentf Perl_re_exec_indentf
#endif
# endif
@@ -1144,7 +1144,7 @@
#define get_regex_charset_name S_get_regex_charset_name
# endif
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define re_printf Perl_re_printf
#endif
#define regprop(a,b,c,d,e) Perl_regprop(aTHX_ a,b,c,d,e)
@@ -1472,7 +1472,7 @@
#define sv_len_utf8_nomg(a) Perl_sv_len_utf8_nomg(aTHX_ a)
#define sv_resetpvn(a,b,c) Perl_sv_resetpvn(aTHX_ a,b,c)
#define sv_sethek(a,b) Perl_sv_sethek(aTHX_ a,b)
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
#define tied_method Perl_tied_method
#endif
#define tmps_grow_p(a) Perl_tmps_grow_p(aTHX_ a)
@@ -2080,7 +2080,7 @@
an extra argument but grab the context pointer using the macro
dTHX.
*/
-#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_SHORT_NAMES)
+#if defined(MULTIPLICITY) && !defined(PERL_NO_SHORT_NAMES)
# define croak Perl_croak_nocontext
# define deb Perl_deb_nocontext
# define die Perl_die_nocontext
@@ -2098,7 +2098,7 @@
#endif /* !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) */
-#if !defined(PERL_IMPLICIT_CONTEXT)
+#if !defined(MULTIPLICITY)
/* undefined symbols, point them back at the usual ones */
# define Perl_croak_nocontext Perl_croak
# define Perl_deb_nocontext Perl_deb
diff --git a/embedvar.h b/embedvar.h
index 67ccd6b723..55abb7a296 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -16,30 +16,8 @@
* Edit those files and run 'make regen_headers' to effect changes.
*/
-/* (Doing namespace management portably in C is really gross.) */
-
-/*
- The following combinations of MULTIPLICITY and PERL_IMPLICIT_CONTEXT
- are supported:
- 1) none
- 2) MULTIPLICITY # supported for compatibility
- 3) MULTIPLICITY && PERL_IMPLICIT_CONTEXT
-
- All other combinations of these flags are errors.
-
- only #3 is supported directly, while #2 is a special
- case of #3 (supported by redefining vTHX appropriately).
-*/
-
#if defined(MULTIPLICITY)
-/* cases 2 and 3 above */
-
-# if defined(PERL_IMPLICIT_CONTEXT)
-# define vTHX aTHX
-# else
-# define vTHX PERL_GET_INTERP
-# endif
-
+# define vTHX aTHX
#define PL_AboveLatin1 (vTHX->IAboveLatin1)
#define PL_Assigned_invlist (vTHX->IAssigned_invlist)
#define PL_CCC_non0_non230 (vTHX->ICCC_non0_non230)
diff --git a/ext/File-Glob/Glob.pm b/ext/File-Glob/Glob.pm
index 29025208d9..42b80cbe5f 100644
--- a/ext/File-Glob/Glob.pm
+++ b/ext/File-Glob/Glob.pm
@@ -35,7 +35,7 @@ $EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}];
@EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
-$VERSION = '1.34';
+$VERSION = '1.35';
sub import {
require Exporter;
diff --git a/ext/File-Glob/bsd_glob.c b/ext/File-Glob/bsd_glob.c
index 7a810db93f..085018d251 100644
--- a/ext/File-Glob/bsd_glob.c
+++ b/ext/File-Glob/bsd_glob.c
@@ -181,7 +181,7 @@ static int match(Char *, Char *, Char *, int);
static void qprintf(const char *, Char *);
#endif /* GLOB_DEBUG */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
static Direntry_t * my_readdir(DIR*);
static Direntry_t *
diff --git a/intrpvar.h b/intrpvar.h
index 5c49d31528..d07644605a 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -926,12 +926,12 @@ PERLVARI(I, globhook, globhook_t, NULL)
# define PERL_LAST_5_18_0_INTERP_MEMBER Iglobhook
#endif
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
PERLVARI(I, my_cxt_list, void **, NULL) /* per-module array of MY_CXT pointers */
PERLVARI(I, my_cxt_size, int, 0) /* size of PL_my_cxt_list */
#endif
-#if defined(PERL_IMPLICIT_CONTEXT) || defined(PERL_DEBUG_READONLY_COW)
+#if defined(MULTIPLICITY) || defined(PERL_DEBUG_READONLY_COW)
/* For use with the memory debugging code in util.c. This is used only in
* DEBUGGING builds (as long as the relevant structure is defined), but
* defining it in non-debug builds too means that we retain binary
diff --git a/makedef.pl b/makedef.pl
index 94ff2f54d1..b5b07a7ece 100644
--- a/makedef.pl
+++ b/makedef.pl
@@ -117,9 +117,9 @@ if ($define{USE_ITHREADS}) {
}
}
-$define{PERL_IMPLICIT_CONTEXT} ||=
+$define{MULTIPLICITY} ||=
$define{USE_ITHREADS} ||
- $define{MULTIPLICITY} ;
+ $define{PERL_IMPLICIT_CONTEXT} ;
if ($define{USE_ITHREADS} && $ARGS{PLATFORM} ne 'win32' && $ARGS{PLATFORM} ne 'netware') {
$define{USE_REENTRANT_API} = 1;
@@ -427,7 +427,7 @@ unless ( $define{'HAS_NEWLOCALE'}
);
}
-unless ($define{'PERL_IMPLICIT_CONTEXT'}) {
+unless ($define{'MULTIPLICITY'}) {
++$skip{$_} foreach qw(
PL_my_cxt_index
PL_my_cxt_list
diff --git a/malloc.c b/malloc.c
index f24fa24826..7016cf4c44 100644
--- a/malloc.c
+++ b/malloc.c
@@ -238,7 +238,7 @@
#include "EXTERN.h"
#define PERL_IN_MALLOC_C
#include "perl.h"
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
# define croak Perl_croak_nocontext
# define croak2 Perl_croak_nocontext
# define warn Perl_warn_nocontext
@@ -292,7 +292,7 @@
} STMT_END
#endif
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
# define PERL_IS_ALIVE aTHX
#else
# define PERL_IS_ALIVE TRUE
diff --git a/mathoms.c b/mathoms.c
index 1144e1519e..533a737a28 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -511,7 +511,7 @@ Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
/* Easier to special case this here than in embed.pl. (Look at what it
generates for proto.h) */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT;
#endif
@@ -528,7 +528,7 @@ Perl_printf_nocontext(const char *format, ...)
va_list arglist;
int ret = 0;
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
PERL_ARGS_ASSERT_PRINTF_NOCONTEXT;
#endif
diff --git a/op.c b/op.c
index c17d1b07d2..9830c1a7e8 100644
--- a/op.c
+++ b/op.c
@@ -8948,7 +8948,7 @@ Perl_load_module(pTHX_ U32 flags, SV *name, SV *ver, ...)
va_end(args);
}
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
void
Perl_load_module_nocontext(U32 flags, SV *name, SV *ver, ...)
{
@@ -12184,7 +12184,7 @@ Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len,
}
CvISXSUB_on(cv);
CvXSUB(cv) = subaddr;
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
CvHSCXT(cv) = &PL_stack_sp;
#else
PoisonPADLIST(cv);
diff --git a/perl.c b/perl.c
index 2c0ca42e45..8604fbc57f 100644
--- a/perl.c
+++ b/perl.c
@@ -1280,7 +1280,7 @@ perl_destruct(pTHXx)
PL_regex_pad = NULL;
#endif
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
/* the entries in this list are allocated via SV PVX's, so get freed
* in sv_clean_all */
Safefree(PL_my_cxt_list);
@@ -3903,7 +3903,7 @@ S_init_interp(pTHX)
#ifdef MULTIPLICITY
# define PERLVAR(prefix,var,type)
# define PERLVARA(prefix,var,n,type)
-# if defined(PERL_IMPLICIT_CONTEXT)
+# if defined(MULTIPLICITY)
# define PERLVARI(prefix,var,type,init) aTHX->prefix##var = init;
# define PERLVARIC(prefix,var,type,init) aTHX->prefix##var = init;
# else
diff --git a/perl.h b/perl.h
index aad665aba8..a4be596713 100644
--- a/perl.h
+++ b/perl.h
@@ -50,7 +50,7 @@
#endif
/* See L<perlguts/"The Perl API"> for detailed notes on
- * PERL_IMPLICIT_CONTEXT and PERL_IMPLICIT_SYS */
+ * MULTIPLICITY and PERL_IMPLICIT_SYS */
/* XXX NOTE that from here --> to <-- the same logic is
* repeated in makedef.pl, so be certain to update
@@ -62,11 +62,15 @@
# endif
#endif
+/* PERL_IMPLICIT_CONTEXT is a legacy synonym for MULTIPLICITY */
#ifdef MULTIPLICITY
# ifndef PERL_IMPLICIT_CONTEXT
# define PERL_IMPLICIT_CONTEXT
# endif
#endif
+#if defined(PERL_IMPLICIT_CONTEXT) && !defined(MULTIPLICITY)
+# define MULTIPLICITY
+#endif
/* undef WIN32 when building on Cygwin (for libwin32) - gph */
#ifdef __CYGWIN__
@@ -146,10 +150,7 @@ Now a synonym for C<L</dTHXa>>.
=cut
*/
-#ifdef PERL_IMPLICIT_CONTEXT
-# ifndef MULTIPLICITY
-# define MULTIPLICITY
-# endif
+#ifdef MULTIPLICITY
# define tTHX PerlInterpreter*
# define pTHX tTHX my_perl PERL_UNUSED_DECL
# define aTHX my_perl
@@ -617,7 +618,7 @@ code.
#ifndef pTHX
/* Don't bother defining tTHX ; using it outside
- * code guarded by PERL_IMPLICIT_CONTEXT is an error.
+ * code guarded by MULTIPLICITY is an error.
*/
# define pTHX void
# define pTHX_
@@ -3706,10 +3707,8 @@ EXTERN_C int perl_tsa_mutex_unlock(perl_mutex* mutex)
# define PERL_GET_INTERP (PL_curinterp)
#endif
-#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_GET_THX)
-# ifdef MULTIPLICITY
-# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
-# endif
+#if defined(MULTIPLICITY) && !defined(PERL_GET_THX)
+# define PERL_GET_THX ((PerlInterpreter *)PERL_GET_CONTEXT)
# define PERL_SET_THX(t) PERL_SET_CONTEXT(t)
#endif
@@ -4795,7 +4794,7 @@ EXTERN_C void PerlIO_teardown(void);
# define MALLOC_TERM
#endif
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
struct perl_memory_debug_header;
struct perl_memory_debug_header {
@@ -5312,9 +5311,6 @@ EXTCONST char PL_bincompat_options[] =
# ifdef PERL_DEBUG_READONLY_OPS
" PERL_DEBUG_READONLY_OPS"
# endif
-# ifdef PERL_IMPLICIT_CONTEXT
- " PERL_IMPLICIT_CONTEXT"
-# endif
# ifdef PERL_IMPLICIT_SYS
" PERL_IMPLICIT_SYS"
# endif
@@ -7318,7 +7314,7 @@ C<strtoul>.
* access MY_CXT.
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* START_MY_CXT must appear in all extensions that define a my_cxt_t structure,
* right after the definition (i.e. at file scope). The non-threads
@@ -7368,7 +7364,7 @@ C<strtoul>.
# define aMY_CXT_ aMY_CXT,
# define _aMY_CXT ,aMY_CXT
-#else /* PERL_IMPLICIT_CONTEXT */
+#else /* MULTIPLICITY */
# define START_MY_CXT static my_cxt_t my_cxt;
# define dMY_CXT dNOOP
# define dMY_CXT_INTERP(my_perl) dNOOP
@@ -7383,7 +7379,7 @@ C<strtoul>.
# define aMY_CXT_
# define _aMY_CXT
-#endif /* !defined(PERL_IMPLICIT_CONTEXT) */
+#endif /* !defined(MULTIPLICITY) */
#ifdef I_FCNTL
# include <fcntl.h>
diff --git a/perlio.c b/perlio.c
index aa85c16f8c..6e3f4cffab 100644
--- a/perlio.c
+++ b/perlio.c
@@ -42,7 +42,7 @@
#define PERL_IN_PERLIO_C
#include "perl.h"
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
# undef dSYS
# define dSYS dTHX
#endif
diff --git a/perlvars.h b/perlvars.h
index c4a08e038b..2ecf29ed12 100644
--- a/perlvars.h
+++ b/perlvars.h
@@ -173,7 +173,7 @@ PERLVAR(G, check_mutex, perl_mutex) /* Mutex for PL_check */
/* allocate a unique index to every module that calls MY_CXT_INIT */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
# ifdef USE_ITHREADS
PERLVAR(G, my_ctx_mutex, perl_mutex)
# endif
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 4780ab4776..35aae102d0 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -358,17 +358,16 @@ XXX
=head1 Internal Changes
-XXX Changes which affect the interface available to C<XS> code go here. Other
-significant internal changes for future core maintainers should be noted as
-well.
-
-[ List each change as an =item entry ]
-
=over 4
=item *
-XXX
+Since the removal of PERL_OBJECT in Perl 5.8, PERL_IMPLICIT_CONTEXT and
+MULTIPLICITY have been synonymous and they were being used interchangeably.
+To simplify the code, all instances of PERL_IMPLICIT_CONTEXT have been
+replaced with MULTIPLICITY.
+
+PERL_IMPLICIT_CONTEXT will remain defined for compatibility with XS modules.
=back
diff --git a/pod/perlembed.pod b/pod/perlembed.pod
index 88cb810cc7..8a17b57b7f 100644
--- a/pod/perlembed.pod
+++ b/pod/perlembed.pod
@@ -1125,7 +1125,7 @@ you will have to write the explicit full form
Perl_warn(aTHX_ "%d bottles of beer on the wall", bottlecount);
-(See L<perlguts/"Background and PERL_IMPLICIT_CONTEXT"> for the explanation
+(See L<perlguts/"Background and MULTIPLICITY"> for the explanation
of the C<aTHX_>. ) Hiding the short forms is very useful for avoiding
all sorts of nasty (C preprocessor or otherwise) conflicts with other
software packages (Perl defines about 2400 APIs with these short names,
diff --git a/pod/perlguts.pod b/pod/perlguts.pod
index fc848bce6c..b05d82486e 100644
--- a/pod/perlguts.pod
+++ b/pod/perlguts.pod
@@ -2540,7 +2540,7 @@ the op tree of the main root.
=head1 How multiple interpreters and concurrency are supported
-=head2 Background and PERL_IMPLICIT_CONTEXT
+=head2 Background and MULTIPLICITY
The Perl interpreter can be regarded as a closed box: it has an API
for feeding it code or otherwise making it do things, but it also has
@@ -2552,11 +2552,11 @@ the context, the state of that interpreter.
The macro that controls the major Perl build flavor is MULTIPLICITY. The
MULTIPLICITY build has a C structure that packages all the interpreter
-state. With multiplicity-enabled perls, PERL_IMPLICIT_CONTEXT is also
-normally defined, and enables the support for passing in a "hidden" first
-argument that represents all three data structures. MULTIPLICITY makes
-multi-threaded perls possible (with the ithreads threading model, related
-to the macro USE_ITHREADS.)
+state, which is being passed to various perl functions as a "hidden"
+first argument. MULTIPLICITY makes multi-threaded perls possible (with the
+ithreads threading model, related to the macro USE_ITHREADS.)
+
+PERL_IMPLICIT_CONTEXT is a legacy synonym for MULTIPLICITY.
To see whether you have non-const data you can use a BSD (or GNU)
compatible C<nm>:
@@ -2624,11 +2624,11 @@ their variants.
=for apidoc Amnh||pTHX
=for apidoc Amnh||pTHX_
-When Perl is built without options that set PERL_IMPLICIT_CONTEXT, there is no
+When Perl is built without options that set MULTIPLICITY, there is no
first argument containing the interpreter's context. The trailing underscore
in the pTHX_ macro indicates that the macro expansion needs a comma
after the context argument because other arguments follow it. If
-PERL_IMPLICIT_CONTEXT is not defined, pTHX_ will be ignored, and the
+MULTIPLICITY is not defined, pTHX_ will be ignored, and the
subroutine is not prototyped to take the extra argument. The form of the
macro without the trailing underscore is used when there are no additional
explicit arguments.
@@ -2637,7 +2637,7 @@ When a core function calls another, it must pass the context. This
is normally hidden via macros. Consider C<sv_setiv>. It expands into
something like this:
- #ifdef PERL_IMPLICIT_CONTEXT
+ #ifdef MULTIPLICITY
#define sv_setiv(a,b) Perl_sv_setiv(aTHX_ a, b)
/* can't do this for vararg functions, see below */
#else
@@ -2680,11 +2680,11 @@ to be a no-op.
=head2 How do I use all this in extensions?
-When Perl is built with PERL_IMPLICIT_CONTEXT, extensions that call
+When Perl is built with MULTIPLICITY, extensions that call
any functions in the Perl API will need to pass the initial context
argument somehow. The kicker is that you will need to write it in
such a way that the extension still compiles when Perl hasn't been
-built with PERL_IMPLICIT_CONTEXT enabled.
+built with MULTIPLICITY enabled.
There are three ways to do this. First, the easy but inefficient way,
which is also the default, in order to maintain source compatibility
@@ -2694,7 +2694,7 @@ Thus, something like:
sv_setiv(sv, num);
-in your extension will translate to this when PERL_IMPLICIT_CONTEXT is
+in your extension will translate to this when MULTIPLICITY is
in effect:
Perl_sv_setiv(Perl_get_context(), sv, num);
@@ -2807,7 +2807,7 @@ thread as the first thing you do:
=head2 Future Plans and PERL_IMPLICIT_SYS
-Just as PERL_IMPLICIT_CONTEXT provides a way to bundle up everything
+Just as MULTIPLICITY provides a way to bundle up everything
that the interpreter knows about itself and pass it around, so too are
there plans to allow the interpreter to bundle up everything it knows
about the environment it's running on. This is enabled with the
diff --git a/pod/perlinterp.pod b/pod/perlinterp.pod
index 3f32c108d1..072ab223dd 100644
--- a/pod/perlinterp.pod
+++ b/pod/perlinterp.pod
@@ -824,7 +824,7 @@ next operator to run back to the main run loop.
Most of these macros are explained in L<perlapi>, and some of the more
important ones are explained in L<perlxs> as well. Pay special
-attention to L<perlguts/Background and PERL_IMPLICIT_CONTEXT> for
+attention to L<perlguts/Background and MULTIPLICITY> for
information on the C<[pad]THX_?> macros.
=head1 FURTHER READING
diff --git a/proto.h b/proto.h
index 455e3ce34b..d162b2e303 100644
--- a/proto.h
+++ b/proto.h
@@ -4736,6 +4736,90 @@ PERL_CALLCONV void Perl_sys_intern_dup(pTHX_ struct interp_intern* src, struct i
assert(src); assert(dst)
# endif
#endif
+#if defined(MULTIPLICITY)
+PERL_CALLCONV_NO_RET void Perl_croak_nocontext(const char* pat, ...)
+ __attribute__noreturn__
+ __attribute__format__null_ok__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT
+
+PERL_CALLCONV void Perl_deb_nocontext(const char* pat, ...)
+ __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
+ assert(pat)
+
+PERL_CALLCONV_NO_RET OP* Perl_die_nocontext(const char* pat, ...)
+ __attribute__noreturn__
+ __attribute__format__null_ok__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_DIE_NOCONTEXT
+
+PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...)
+ __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_FORM_NOCONTEXT \
+ assert(pat)
+
+#ifndef NO_MATHOMS
+PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
+ __attribute__deprecated__
+ __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT \
+ assert(stream); assert(format)
+#endif
+
+PERL_CALLCONV void Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...);
+#define PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT \
+ assert(name)
+PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...)
+ __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_MESS_NOCONTEXT \
+ assert(pat)
+
+PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *indexp, size_t size);
+#define PERL_ARGS_ASSERT_MY_CXT_INIT \
+ assert(indexp)
+PERL_CALLCONV SV* Perl_newSVpvf_nocontext(const char *const pat, ...)
+ __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT \
+ assert(pat)
+
+#ifndef NO_MATHOMS
+PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...)
+ __attribute__deprecated__
+ __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_PRINTF_NOCONTEXT \
+ assert(format)
+#endif
+
+PERL_CALLCONV void Perl_sv_catpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
+ __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT \
+ assert(sv); assert(pat)
+
+PERL_CALLCONV void Perl_sv_catpvf_nocontext(SV *const sv, const char *const pat, ...)
+ __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT \
+ assert(sv); assert(pat)
+
+PERL_CALLCONV void Perl_sv_setpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
+ __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT \
+ assert(sv); assert(pat)
+
+PERL_CALLCONV void Perl_sv_setpvf_nocontext(SV *const sv, const char *const pat, ...)
+ __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT \
+ assert(sv); assert(pat)
+
+PERL_CALLCONV void Perl_warn_nocontext(const char* pat, ...)
+ __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_WARN_NOCONTEXT \
+ assert(pat)
+
+PERL_CALLCONV void Perl_warner_nocontext(U32 err, const char* pat, ...)
+ __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_WARNER_NOCONTEXT \
+ assert(pat)
+
+#endif
#if defined(MYMALLOC)
PERL_CALLCONV void Perl_dump_mstats(pTHX_ const char* s);
#define PERL_ARGS_ASSERT_DUMP_MSTATS \
@@ -4852,90 +4936,6 @@ PERL_CALLCONV GV* Perl_gv_SVadd(pTHX_ GV *gv);
#define PERL_ARGS_ASSERT_GV_SVADD
#endif
#endif
-#if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV_NO_RET void Perl_croak_nocontext(const char* pat, ...)
- __attribute__noreturn__
- __attribute__format__null_ok__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT
-
-PERL_CALLCONV void Perl_deb_nocontext(const char* pat, ...)
- __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
- assert(pat)
-
-PERL_CALLCONV_NO_RET OP* Perl_die_nocontext(const char* pat, ...)
- __attribute__noreturn__
- __attribute__format__null_ok__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_DIE_NOCONTEXT
-
-PERL_CALLCONV char* Perl_form_nocontext(const char* pat, ...)
- __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_FORM_NOCONTEXT \
- assert(pat)
-
-#ifndef NO_MATHOMS
-PERL_CALLCONV int Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
- __attribute__deprecated__
- __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT \
- assert(stream); assert(format)
-#endif
-
-PERL_CALLCONV void Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...);
-#define PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT \
- assert(name)
-PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...)
- __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_MESS_NOCONTEXT \
- assert(pat)
-
-PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *indexp, size_t size);
-#define PERL_ARGS_ASSERT_MY_CXT_INIT \
- assert(indexp)
-PERL_CALLCONV SV* Perl_newSVpvf_nocontext(const char *const pat, ...)
- __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT \
- assert(pat)
-
-#ifndef NO_MATHOMS
-PERL_CALLCONV int Perl_printf_nocontext(const char *format, ...)
- __attribute__deprecated__
- __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_PRINTF_NOCONTEXT \
- assert(format)
-#endif
-
-PERL_CALLCONV void Perl_sv_catpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
- __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT \
- assert(sv); assert(pat)
-
-PERL_CALLCONV void Perl_sv_catpvf_nocontext(SV *const sv, const char *const pat, ...)
- __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT \
- assert(sv); assert(pat)
-
-PERL_CALLCONV void Perl_sv_setpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
- __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT \
- assert(sv); assert(pat)
-
-PERL_CALLCONV void Perl_sv_setpvf_nocontext(SV *const sv, const char *const pat, ...)
- __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT \
- assert(sv); assert(pat)
-
-PERL_CALLCONV void Perl_warn_nocontext(const char* pat, ...)
- __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_WARN_NOCONTEXT \
- assert(pat)
-
-PERL_CALLCONV void Perl_warner_nocontext(U32 err, const char* pat, ...)
- __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_WARNER_NOCONTEXT \
- assert(pat)
-
-#endif
#if defined(PERL_IMPLICIT_SYS)
PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem *ipM, struct IPerlMem *ipMS, struct IPerlMem *ipMP, struct IPerlEnv *ipE, struct IPerlStdIO *ipStd, struct IPerlLIO *ipLIO, struct IPerlDir *ipD, struct IPerlSock *ipS, struct IPerlProc *ipP);
#define PERL_ARGS_ASSERT_PERL_ALLOC_USING \
diff --git a/regen/embed.pl b/regen/embed.pl
index df4e692ac5..3a3034bb79 100755
--- a/regen/embed.pl
+++ b/regen/embed.pl
@@ -356,8 +356,8 @@ sub embed_h {
elsif ($args and $args[$args-1] =~ /\.\.\./) {
if ($flags =~ /p/) {
# we're out of luck for varargs functions under CPP
- # So we can only do these macros for no implicit context:
- $ret = "#ifndef PERL_IMPLICIT_CONTEXT\n"
+ # So we can only do these macros for non-MULTIPLICITY perls:
+ $ret = "#ifndef MULTIPLICITY\n"
. hide($func, full_name($func, $flags)) . "#endif\n";
}
}
@@ -386,10 +386,10 @@ sub embed_h {
while ($lines =~ s/#\s*if[^\n]+\n#\s*endif\n//) {
}
# Merge adjacent blocks.
- while ($lines =~ s/(#ifndef PERL_IMPLICIT_CONTEXT
+ while ($lines =~ s/(#ifndef MULTIPLICITY
[^\n]+
)#endif
-#ifndef PERL_IMPLICIT_CONTEXT
+#ifndef MULTIPLICITY
/$1/) {
}
@@ -459,7 +459,7 @@ print $em <<'END';
an extra argument but grab the context pointer using the macro
dTHX.
*/
-#if defined(PERL_IMPLICIT_CONTEXT) && !defined(PERL_NO_SHORT_NAMES)
+#if defined(MULTIPLICITY) && !defined(PERL_NO_SHORT_NAMES)
END
foreach (@nocontext) {
@@ -471,7 +471,7 @@ print $em <<'END';
#endif /* !defined(PERL_CORE) && !defined(PERL_NOCOMPAT) */
-#if !defined(PERL_IMPLICIT_CONTEXT)
+#if !defined(MULTIPLICITY)
/* undefined symbols, point them back at the usual ones */
END
@@ -488,30 +488,8 @@ read_only_bottom_close_and_rename($em) if ! $error_count;
$em = open_print_header('embedvar.h');
print $em <<'END';
-/* (Doing namespace management portably in C is really gross.) */
-
-/*
- The following combinations of MULTIPLICITY and PERL_IMPLICIT_CONTEXT
- are supported:
- 1) none
- 2) MULTIPLICITY # supported for compatibility
- 3) MULTIPLICITY && PERL_IMPLICIT_CONTEXT
-
- All other combinations of these flags are errors.
-
- only #3 is supported directly, while #2 is a special
- case of #3 (supported by redefining vTHX appropriately).
-*/
-
#if defined(MULTIPLICITY)
-/* cases 2 and 3 above */
-
-# if defined(PERL_IMPLICIT_CONTEXT)
-# define vTHX aTHX
-# else
-# define vTHX PERL_GET_INTERP
-# endif
-
+# define vTHX aTHX
END
my $sym;
diff --git a/sv.c b/sv.c
index e0dd6140f9..3c69dece01 100644
--- a/sv.c
+++ b/sv.c
@@ -9532,7 +9532,7 @@ Perl_newSVpv_share(pTHX_ const char *src, U32 hash)
return newSVpvn_share(src, strlen(src), hash);
}
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* pTHX_ magic can't cope with varargs, so this is a no-context
* version of the main function, (which may itself be aliased to us).
@@ -10736,7 +10736,7 @@ Perl_sv_setpviv_mg(pTHX_ SV *const sv, const IV iv)
#endif /* NO_MATHOMS */
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* pTHX_ magic can't cope with varargs, so this is a no-context
* version of the main function, (which may itself be aliased to us).
@@ -10853,7 +10853,7 @@ Perl_sv_vsetpvf_mg(pTHX_ SV *const sv, const char *const pat, va_list *const arg
SvSETMAGIC(sv);
}
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* pTHX_ magic can't cope with varargs, so this is a no-context
* version of the main function, (which may itself be aliased to us).
diff --git a/util.c b/util.c
index 8103260181..3cea45a34b 100644
--- a/util.c
+++ b/util.c
@@ -1513,7 +1513,7 @@ S_mess_alloc(pTHX)
return sv;
}
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
char *
Perl_form_nocontext(const char* pat, ...)
{
@@ -1526,7 +1526,7 @@ Perl_form_nocontext(const char* pat, ...)
va_end(args);
return retval;
}
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
/*
=for apidoc_section $display
@@ -1597,7 +1597,7 @@ already have the thread context.
=cut
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
SV *
Perl_mess_nocontext(const char *pat, ...)
{
@@ -1610,7 +1610,7 @@ Perl_mess_nocontext(const char *pat, ...)
va_end(args);
return retval;
}
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
SV *
Perl_mess(pTHX_ const char *pat, ...)
@@ -1915,7 +1915,7 @@ The function never actually returns.
=cut
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* silence __declspec(noreturn) warnings */
MSVC_DIAG_IGNORE(4646 4645)
@@ -1932,7 +1932,7 @@ Perl_die_nocontext(const char* pat, ...)
}
MSVC_DIAG_RESTORE
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
/* silence __declspec(noreturn) warnings */
MSVC_DIAG_IGNORE(4646 4645)
@@ -2041,7 +2041,7 @@ when you are about to throw an exception.
=cut
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
void
Perl_croak_nocontext(const char *pat, ...)
{
@@ -2052,7 +2052,7 @@ Perl_croak_nocontext(const char *pat, ...)
NOT_REACHED; /* NOTREACHED */
va_end(args);
}
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
/* saves machine code for a common noreturn idiom typically used in Newx*() */
GCC_DIAG_IGNORE_DECL(-Wunused-function);
@@ -2192,7 +2192,7 @@ already have the thread context.
=cut
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
void
Perl_warn_nocontext(const char *pat, ...)
{
@@ -2203,7 +2203,7 @@ Perl_warn_nocontext(const char *pat, ...)
vwarn(pat, &args);
va_end(args);
}
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
void
Perl_warn(pTHX_ const char *pat, ...)
@@ -2264,7 +2264,7 @@ This is like C<L</warner>>, but C<args> are an encapsulated argument list.
=cut
*/
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
void
Perl_warner_nocontext(U32 err, const char *pat, ...)
{
@@ -2275,7 +2275,7 @@ Perl_warner_nocontext(U32 err, const char *pat, ...)
vwarner(err, pat, &args);
va_end(args);
}
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
void
Perl_ck_warner_d(pTHX_ U32 err, const char* pat, ...)
@@ -5483,7 +5483,7 @@ Perl_my_clearenv(pTHX)
#endif /* PERL_MICRO */
}
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
/* Implements the MY_CXT_INIT macro. The first time a module is loaded,
@@ -5538,7 +5538,7 @@ Perl_my_cxt_init(pTHX_ int *indexp, size_t size)
return p;
}
-#endif /* PERL_IMPLICIT_CONTEXT */
+#endif /* MULTIPLICITY */
/* Perl_xs_handshake():
@@ -5584,7 +5584,7 @@ Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...)
U32 items, ax;
void * got;
void * need;
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
dTHX;
tTHX xs_interp;
#else
@@ -5603,7 +5603,7 @@ Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...)
2nd threaded perl interp DLL never initialized its TLS/PERL_SYS_INIT3 so
dTHX call from 2nd interp DLL can't return the my_perl that pp_entersub
passed to the XS DLL */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
xs_interp = (tTHX)v_my_perl;
got = xs_interp;
need = my_perl;
diff --git a/util.h b/util.h
index b2e0b7797b..ae6f1034b8 100644
--- a/util.h
+++ b/util.h
@@ -189,7 +189,7 @@ typedef struct {
/* uses var file to set default filename for newXS_deffile to use for CvFILE */
#define HSf_SETXSUBFN 0x00000020
#define HSf_POPMARK 0x00000040 /* popmark mode or you must supply ax and items */
-#define HSf_IMP_CXT 0x00000080 /* ABI, threaded/PERL_IMPLICIT_CONTEXT, pTHX_ present */
+#define HSf_IMP_CXT 0x00000080 /* ABI, threaded/MULTIPLICITY, pTHX_ present */
#define HSm_INTRPSIZE 0xFFFF0000 /* ABI, interp struct size */
/* A mask of bits in the key which must always match between a XS mod and interp.
Also if all ABI bits in a key are true, skip all ABI checks, it is very
@@ -226,7 +226,7 @@ means arg not present, 1 is empty string/null byte */
not public API. This more friendly version already collected all ABI info */
/* U32 return = (bool setxsubfn, bool popmark, "litteral_string_api_ver",
"litteral_string_xs_ver") */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
# define HS_KEY(setxsubfn, popmark, apiver, xsver) \
HS_KEYp(sizeof(PerlInterpreter), TRUE, setxsubfn, popmark, \
sizeof("" apiver "")-1, sizeof("" xsver "")-1)
diff --git a/vms/vms.c b/vms/vms.c
index 08cb52e463..abdbe11bfe 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -892,7 +892,7 @@ Perl_vmstrnenv(const char *lnm, char *eqv, unsigned long int idx,
{LNM$C_NAMLENGTH, LNM$_STRING, eqv, &eqvlen},
{0, 0, 0, 0}};
$DESCRIPTOR(crtlenv,"CRTL_ENV"); $DESCRIPTOR(clisym,"CLISYM");
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
pTHX = NULL;
if (PL_curinterp) {
aTHX = PERL_GET_INTERP;
@@ -925,7 +925,7 @@ Perl_vmstrnenv(const char *lnm, char *eqv, unsigned long int idx,
int i;
if (!environ) {
ivenv = 1;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
if (aTHX == NULL) {
fprintf(stderr,
"Can't read CRTL environ\n");
@@ -968,7 +968,7 @@ Perl_vmstrnenv(const char *lnm, char *eqv, unsigned long int idx,
/* fully initialized, in which case either thr or PL_curcop */
/* might be bogus. We have to check, since ckWARN needs them */
/* both to be valid if running threaded */
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
if (aTHX == NULL) {
fprintf(stderr,
"Value of CLI symbol \"%s\" too long",lnm);
@@ -1044,7 +1044,7 @@ Perl_my_trnlnm(pTHX_ const char *lnm, char *eqv, unsigned long int idx)
{
int flags = 0;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
if (aTHX != NULL)
#endif
#ifdef SECURE_INTERNAL_GETENV
@@ -1287,7 +1287,7 @@ prime_env_iter(void)
$DESCRIPTOR(clidsc,"DCL"); $DESCRIPTOR(clitabdsc,"DCLTABLES");
$DESCRIPTOR(crtlenv,"CRTL_ENV"); $DESCRIPTOR(clisym,"CLISYM");
$DESCRIPTOR(local,"_LOCAL"); $DESCRIPTOR(mbxdsc,mbxnam);
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
pTHX;
#endif
#if defined(USE_ITHREADS)
@@ -1295,7 +1295,7 @@ prime_env_iter(void)
MUTEX_INIT(&primenv_mutex);
#endif
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* We jump through these hoops because we can be called at */
/* platform-specific initialization time, which is before anything is */
/* set up--we can't even do a plain dTHX since that relies on the */
@@ -2952,7 +2952,7 @@ struct _pipe {
pInfo info;
pCBuf curr;
pCBuf curr2;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
void *thx; /* Either a thread or an interpreter */
/* pointer, depending on how we're built */
#endif
@@ -3030,7 +3030,7 @@ pipe_exit_routine(void)
info = open_pipes;
while (info) {
if (info->fp) {
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* We need to use the Perl context of the thread that created */
/* the pipe. */
pTHX;
@@ -3138,7 +3138,7 @@ pipe_exit_routine(void)
while(open_pipes) {
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* We need to use the Perl context of the thread that created */
/* the pipe. */
pTHX;
@@ -3274,7 +3274,7 @@ pipe_tochild_setup(pTHX_ char *rmbx, char *wmbx)
p->curr = 0;
p->curr2 = 0;
p->info = 0;
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
p->thx = aTHX;
#endif
@@ -3302,7 +3302,7 @@ pipe_tochild1_ast(pPipe p)
int iss = p->iosb.status;
int eof = (iss == SS$_ENDOFFILE);
int sts;
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
pTHX = p->thx;
#endif
@@ -3366,7 +3366,7 @@ pipe_tochild2_ast(pPipe p)
int n = sizeof(CBuf) + p->bufsize;
int done = (p->info && p->info->done) ||
iss == SS$_CANCEL || iss == SS$_ABORT;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
pTHX = p->thx;
#endif
@@ -3438,7 +3438,7 @@ pipe_infromchild_setup(pTHX_ char *rmbx, char *wmbx)
p->info = 0;
p->type = 0;
p->iosb.status = SS$_NORMAL;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
p->thx = aTHX;
#endif
pipe_infromchild_ast(p);
@@ -3455,7 +3455,7 @@ pipe_infromchild_ast(pPipe p)
int eof = (iss == SS$_ENDOFFILE);
int myeof = (eof && (p->iosb.dvispec == mypid || p->iosb.dvispec == 0));
int kideof = (eof && (p->iosb.dvispec == p->info->pid));
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
pTHX = p->thx;
#endif
@@ -3608,7 +3608,7 @@ pipe_mbxtofd_ast(pPipe p)
int eof = (iss == SS$_ENDOFFILE);
int myeof = eof && ((p->iosb.dvispec == mypid)||(p->iosb.dvispec == 0));
int err = !(iss&1) && !eof;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
pTHX = p->thx;
#endif
@@ -3696,7 +3696,7 @@ store_pipelocs(pTHX)
unixdir = (char *)PerlMem_malloc(VMS_MAXRSS);
if (unixdir == NULL) _ckvmssts_noperl(SS$_INSFMEM);
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
if (aTHX && PL_origargv && PL_origargv[0]) { /* maybe nul if embedded Perl */
#else
if (PL_origargv && PL_origargv[0]) { /* maybe nul if embedded Perl */
@@ -3729,7 +3729,7 @@ store_pipelocs(pTHX)
/* reverse order of @INC entries, skip "." since entered above */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
if (aTHX)
#endif
if (PL_incgv) av = GvAVn(PL_incgv);
@@ -3765,7 +3765,7 @@ store_pipelocs(pTHX)
static I32 Perl_cando_by_name_int(pTHX_ I32 bit, bool effective,
const char *fname, int opts);
-#if !defined(PERL_IMPLICIT_CONTEXT)
+#if !defined(MULTIPLICITY)
#define cando_by_name_int Perl_cando_by_name_int
#else
#define cando_by_name_int(a,b,c,d) Perl_cando_by_name_int(aTHX_ a,b,c,d)
@@ -4212,7 +4212,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts)
if (*in_mode == 'r') {
PerlIO * xterm_fd;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
/* Can not fork an xterm with a NULL context */
/* This probably could never happen */
xterm_fd = NULL;
@@ -4523,7 +4523,7 @@ safe_popen(pTHX_ const char *cmd, const char *in_mode, int *psts)
_ckvmssts_noperl(lib$delete_symbol(&d_sym_out, &table));
vms_execfree(vmscmd);
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
if (aTHX)
#endif
PL_forkprocess = info->pid;
@@ -9642,7 +9642,7 @@ vms_image_init(int *argcp, char ***argvp)
unsigned long int iprv[(sizeof(union prvdef) + sizeof(unsigned long int) - 1) / sizeof(unsigned long int)];
unsigned short int dummy, rlen;
struct dsc$descriptor_s **tabvec;
-#if defined(PERL_IMPLICIT_CONTEXT)
+#if defined(MULTIPLICITY)
pTHX = NULL;
#endif
struct itmlst_3 jpilist[4] = { {sizeof iprv, JPI$_IMAGPRIV, iprv, &dummy},
@@ -10056,7 +10056,7 @@ Perl_trim_unixpath(pTHX_ char *fspec, const char *wildspec, int opts)
#ifdef readdir
# undef readdir
#endif
-#if !defined(PERL_IMPLICIT_CONTEXT)
+#if !defined(MULTIPLICITY)
# define readdir Perl_readdir
#else
# define readdir(a) Perl_readdir(aTHX_ a)
diff --git a/vms/vmsish.h b/vms/vmsish.h
index ed3b299ce3..ba228e5767 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -102,7 +102,7 @@
/* Our own contribution to PerlShr's global symbols . . . */
-#if !defined(PERL_IMPLICIT_CONTEXT)
+#if !defined(MULTIPLICITY)
#define opendir Perl_opendir
#define rename Perl_rename
#define seekdir Perl_seekdir
@@ -263,7 +263,7 @@
#define HINT_M_VMSISH_STATUS 0x40000000 /* system, $? return VMS status */
#define HINT_M_VMSISH_TIME 0x80000000 /* times are local, not UTC */
-#ifdef PERL_IMPLICIT_CONTEXT
+#ifdef MULTIPLICITY
# define TEST_VMSISH(h) (my_perl && PL_curcop && (PL_curcop->cop_hints & (h)))
#else
# define TEST_VMSISH(h) (PL_curcop && (PL_curcop->cop_hints & (h)))
diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index d466826da6..14494c7df9 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -338,7 +338,7 @@ BUILDOPT += -DUSE_SITECUSTOMIZE
endif
ifneq ($(USE_MULTI),undef)
-BUILDOPT += -DPERL_IMPLICIT_CONTEXT
+BUILDOPT += -DMULTIPLICITY
endif
ifneq ($(USE_IMP_SYS),undef)
diff --git a/win32/Makefile b/win32/Makefile
index 545b742e47..040ec35507 100644
--- a/win32/Makefile
+++ b/win32/Makefile
@@ -314,7 +314,7 @@ BUILDOPT = $(BUILDOPT) -DUSE_SITECUSTOMIZE
!ENDIF
!IF "$(USE_MULTI)" != "undef"
-BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT
+BUILDOPT = $(BUILDOPT) -DMULTIPLICITY
!ENDIF
!IF "$(USE_IMP_SYS)" != "undef"