Skip to content

Commit

Permalink
Remove use of dVAR in core
Browse files Browse the repository at this point in the history
It only does anything under PERL_GLOBAL_STRUCT, which is gone.
Keep the dNOOP defintion for CPAN back-compat
  • Loading branch information
ilmari committed Jul 20, 2020
1 parent 8c3a0f6 commit c91f661
Show file tree
Hide file tree
Showing 39 changed files with 18 additions and 261 deletions.
2 changes: 0 additions & 2 deletions amigaos4/amigaio.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ static void S_exec_failed(pTHX_ const char *cmd, int fd, int do_report)

static I32 S_do_amigaos_exec3(pTHX_ const char *incmd, int fd, int do_report)
{
dVAR;
const char **argv, **a;
char *s;
char *buf;
Expand Down Expand Up @@ -750,7 +749,6 @@ static I32 S_do_amigaos_exec3(pTHX_ const char *incmd, int fd, int do_report)
I32 S_do_amigaos_aexec5(
pTHX_ SV *really, SV **mark, SV **sp, int fd, int do_report)
{
dVAR;
I32 result = -1;
PERL_ARGS_ASSERT_DO_AEXEC5;
ENTER;
Expand Down
4 changes: 0 additions & 4 deletions cygwin/cygwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ wide_to_utf8(const wchar_t *wbuf)
char *buf;
int wlen = 0;
char *oldlocale;
dVAR;

/* Here and elsewhere in this file, we have a critical section to prevent
* another thread from changing the locale out from under us. XXX But why
Expand Down Expand Up @@ -193,7 +192,6 @@ utf8_to_wide(const char *buf)
mbstate_t mbs;
char *oldlocale;
int wlen = sizeof(wchar_t)*strlen(buf);
dVAR;

LOCALE_LOCK;

Expand Down Expand Up @@ -308,7 +306,6 @@ XS(XS_Cygwin_win_to_posix_path)
if (!IN_BYTES) {
mbstate_t mbs;
char *oldlocale;
dVAR;

LOCALE_LOCK;

Expand Down Expand Up @@ -400,7 +397,6 @@ XS(XS_Cygwin_posix_to_win_path)
wchar_t *wpath = (wchar_t *) safemalloc(sizeof(wchar_t)*len);
wchar_t *wbuf = (wchar_t *) safemalloc(wlen);
char *oldlocale;
dVAR;

LOCALE_LOCK;

Expand Down
12 changes: 0 additions & 12 deletions doio.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ Perl_PerlLIO_dup_cloexec(pTHX_ int oldfd)
* to extend it, so for the time being this just isn't available on
* PERL_IMPLICIT_SYS builds.
*/
dVAR;
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
PL_strategy_dup,
fcntl(oldfd, F_DUPFD_CLOEXEC, 0),
Expand All @@ -210,7 +209,6 @@ Perl_PerlLIO_dup2_cloexec(pTHX_ int oldfd, int newfd)
* to extend it, so for the time being this just isn't available on
* PERL_IMPLICIT_SYS builds.
*/
dVAR;
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
PL_strategy_dup2,
dup3(oldfd, newfd, O_CLOEXEC),
Expand All @@ -223,7 +221,6 @@ Perl_PerlLIO_dup2_cloexec(pTHX_ int oldfd, int newfd)
int
Perl_PerlLIO_open_cloexec(pTHX_ const char *file, int flag)
{
dVAR;
PERL_ARGS_ASSERT_PERLLIO_OPEN_CLOEXEC;
#if defined(O_CLOEXEC)
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
Expand All @@ -238,7 +235,6 @@ Perl_PerlLIO_open_cloexec(pTHX_ const char *file, int flag)
int
Perl_PerlLIO_open3_cloexec(pTHX_ const char *file, int flag, int perm)
{
dVAR;
PERL_ARGS_ASSERT_PERLLIO_OPEN3_CLOEXEC;
#if defined(O_CLOEXEC)
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
Expand All @@ -253,7 +249,6 @@ Perl_PerlLIO_open3_cloexec(pTHX_ const char *file, int flag, int perm)
int
Perl_my_mkstemp_cloexec(char *templte)
{
dVAR;
PERL_ARGS_ASSERT_MY_MKSTEMP_CLOEXEC;
#if defined(O_CLOEXEC)
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
Expand All @@ -268,7 +263,6 @@ Perl_my_mkstemp_cloexec(char *templte)
int
Perl_my_mkostemp_cloexec(char *templte, int flags)
{
dVAR;
PERL_ARGS_ASSERT_MY_MKOSTEMP_CLOEXEC;
#if defined(O_CLOEXEC)
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
Expand All @@ -284,7 +278,6 @@ Perl_my_mkostemp_cloexec(char *templte, int flags)
int
Perl_PerlProc_pipe_cloexec(pTHX_ int *pipefd)
{
dVAR;
PERL_ARGS_ASSERT_PERLPROC_PIPE_CLOEXEC;
/*
* struct IPerlProc doesn't cover pipe2(), and there's no clear way
Expand All @@ -307,7 +300,6 @@ int
Perl_PerlSock_socket_cloexec(pTHX_ int domain, int type, int protocol)
{
# if defined(SOCK_CLOEXEC)
dVAR;
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
PL_strategy_socket,
PerlSock_socket(domain, type | SOCK_CLOEXEC, protocol),
Expand All @@ -328,7 +320,6 @@ Perl_PerlSock_accept_cloexec(pTHX_ int listenfd, struct sockaddr *addr,
* way to extend it, so for the time being this just isn't available
* on PERL_IMPLICIT_SYS builds.
*/
dVAR;
DO_ONEOPEN_EXPERIMENTING_CLOEXEC(
PL_strategy_accept,
accept4(listenfd, addr, addrlen, SOCK_CLOEXEC),
Expand All @@ -347,7 +338,6 @@ int
Perl_PerlSock_socketpair_cloexec(pTHX_ int domain, int type, int protocol,
int *pairfd)
{
dVAR;
PERL_ARGS_ASSERT_PERLSOCK_SOCKETPAIR_CLOEXEC;
# ifdef SOCK_CLOEXEC
DO_PIPEOPEN_EXPERIMENTING_CLOEXEC(PL_strategy_socketpair, pairfd,
Expand Down Expand Up @@ -2297,7 +2287,6 @@ bool
Perl_do_aexec5(pTHX_ SV *really, SV **mark, SV **sp,
int fd, int do_report)
{
dVAR;
PERL_ARGS_ASSERT_DO_AEXEC5;
#if defined(__LIBCATAMOUNT__)
Perl_croak(aTHX_ "exec? I'm not *that* kind of operating system");
Expand Down Expand Up @@ -2348,7 +2337,6 @@ Perl_do_aexec5(pTHX_ SV *really, SV **mark, SV **sp,
bool
Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report)
{
dVAR;
const char **argv, **a;
char *s;
char *buf;
Expand Down
3 changes: 0 additions & 3 deletions dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pv
char *
Perl_sv_peek(pTHX_ SV *sv)
{
dVAR;
SV * const t = sv_newmortal();
int unref = 0;
U32 type;
Expand Down Expand Up @@ -929,7 +928,6 @@ Perl_pmop_dump(pTHX_ PMOP *pm)
STATIC UV
S_sequence_num(pTHX_ const OP *o)
{
dVAR;
SV *op,
**seq;
const char *key;
Expand Down Expand Up @@ -1733,7 +1731,6 @@ const struct flag_to_name regexp_core_intflags_names[] = {
void
Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim)
{
dVAR;
SV *d;
const char *s;
U32 flags;
Expand Down
2 changes: 1 addition & 1 deletion ext/B/B.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sub import {
# walkoptree comes from B.xs

BEGIN {
$B::VERSION = '1.80';
$B::VERSION = '1.81';
@B::EXPORT_OK = ();

# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
Expand Down
1 change: 0 additions & 1 deletion ext/B/B.xs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ typedef PADNAME *B__PADNAME;
static XSPROTO(intrpvar_sv_common); /* prototype to pass -Wmissing-prototypes */
static XSPROTO(intrpvar_sv_common)
{
dVAR;
dXSARGS;
SV *ret;
if (items != 0)
Expand Down
2 changes: 1 addition & 1 deletion ext/Devel-Peek/Peek.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package Devel::Peek;

$VERSION = '1.28';
$VERSION = '1.29';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;

Expand Down
1 change: 0 additions & 1 deletion ext/Devel-Peek/Peek.xs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ mstats2hash(SV *sv, SV *rv, int level)
static void
S_do_dump(pTHX_ SV *const sv, I32 lim)
{
dVAR;
SV *pv_lim_sv = perl_get_sv("Devel::Peek::pv_limit", 0);
const STRLEN pv_lim = pv_lim_sv ? SvIV(pv_lim_sv) : 0;
SV *dumpop = perl_get_sv("Devel::Peek::dump_ops", 0);
Expand Down
2 changes: 1 addition & 1 deletion ext/Fcntl/Fcntl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
require Exporter;
require XSLoader;
@ISA = qw(Exporter);
$VERSION = '1.13';
$VERSION = '1.14';

XSLoader::load();

Expand Down
1 change: 0 additions & 1 deletion ext/Fcntl/Fcntl.xs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
static void
XS_Fcntl_S_ISREG(pTHX_ CV* cv)
{
dVAR;
dXSARGS;
dXSI32;
/* Preserve the semantics of the perl code, which was:
Expand Down
1 change: 0 additions & 1 deletion ext/POSIX/POSIX.xs
Original file line number Diff line number Diff line change
Expand Up @@ -2975,7 +2975,6 @@ sigaction(sig, optaction, oldaction = 0)
# interface look beautiful, which is hard.

{
dVAR;
POSIX__SigAction action;
GV *siggv = gv_fetchpvs("SIG", GV_ADD, SVt_PVHV);
struct sigaction act;
Expand Down
2 changes: 1 addition & 1 deletion ext/PerlIO-mmap/mmap.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package PerlIO::mmap;
use strict;
use warnings;
our $VERSION = '0.016';
our $VERSION = '0.017';

use XSLoader;
XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
Expand Down
1 change: 0 additions & 1 deletion ext/PerlIO-mmap/mmap.xs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ typedef struct {
static IV
PerlIOMmap_map(pTHX_ PerlIO *f)
{
dVAR;
PerlIOMmap * const m = PerlIOSelf(f, PerlIOMmap);
const IV flags = PerlIOBase(f)->flags;
IV code = 0;
Expand Down
3 changes: 0 additions & 3 deletions gv.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ Perl_newGP(pTHX_ GV *const gv)
#ifndef USE_ITHREADS
GV *filegv;
#endif
dVAR;

PERL_ARGS_ASSERT_NEWGP;
Newxz(gp, 1, GP);
Expand Down Expand Up @@ -3144,7 +3143,6 @@ Perl_amagic_is_enabled(pTHX_ int method)
SV*
Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
{
dVAR;
MAGIC *mg;
CV *cv=NULL;
CV **cvp=NULL, **ocvp=NULL;
Expand Down Expand Up @@ -3642,7 +3640,6 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
void
Perl_gv_name_set(pTHX_ GV *gv, const char *name, U32 len, U32 flags)
{
dVAR;
U32 hash;

PERL_ARGS_ASSERT_GV_NAME_SET;
Expand Down
2 changes: 1 addition & 1 deletion haiku/Haiku/Haiku.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ BEGIN {
require DynaLoader;

@ISA = qw|Exporter DynaLoader|;
$VERSION = '0.35';
$VERSION = '0.36';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;

Expand Down
4 changes: 0 additions & 4 deletions haiku/Haiku/Haiku.xs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ static void
haiku_do_debug_printf(pTHX_ SV *sv,
void (*printfFunc)(const char*,...))
{
dVAR;

if (!sv)
return;
Expand Down Expand Up @@ -55,7 +54,6 @@ haiku_do_debug_printf(pTHX_ SV *sv,

XS(haiku_debug_printf)
{
dVAR;
dXSARGS;
dORIGMARK;
SV *sv;
Expand All @@ -78,7 +76,6 @@ XS(haiku_debug_printf)

XS(haiku_ktrace_printf)
{
dVAR;
dXSARGS;
dORIGMARK;
SV *sv;
Expand All @@ -101,7 +98,6 @@ XS(haiku_ktrace_printf)

XS(haiku_debugger)
{
dVAR;
dXSARGS;
dORIGMARK;
SV *sv;
Expand Down
Loading

0 comments on commit c91f661

Please sign in to comment.