summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B/C.pm4
-rw-r--r--ext/B/C/C.xs2
-rw-r--r--ext/ByteLoader/bytecode.h4
-rw-r--r--ext/ByteLoader/byterun.c2
-rw-r--r--ext/Devel/DProf/DProf.xs2
-rw-r--r--ext/DynaLoader/dl_aix.xs4
-rw-r--r--ext/DynaLoader/dl_next.xs2
-rw-r--r--ext/DynaLoader/dl_vms.xs4
-rw-r--r--ext/File/Glob/bsd_glob.c6
-rw-r--r--ext/ODBM_File/ODBM_File.xs2
-rw-r--r--ext/Opcode/Opcode.xs2
-rw-r--r--ext/POSIX/POSIX.xs6
-rw-r--r--ext/Socket/Socket.xs2
-rw-r--r--ext/XS/Typemap/Typemap.xs2
14 files changed, 22 insertions, 22 deletions
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 51b357ef52..5c3c6ba84f 100644
--- a/ext/B/B/C.pm
+++ b/ext/B/B/C.pm
@@ -659,7 +659,7 @@ sub savepvn {
# work with byte offsets/lengths
my $pv = pack "a*", $pv;
if (defined $max_string_len && length($pv) > $max_string_len) {
- push @res, sprintf("New(0,%s,%u,char);", $dest, length($pv)+1);
+ push @res, sprintf("Newx(%s,%u,char);", $dest, length($pv)+1);
my $offset = 0;
while (length $pv) {
my $str = substr $pv, 0, $max_string_len, '';
@@ -1579,7 +1579,7 @@ EOT
#else
#define EXTRA_OPTIONS 4
#endif /* ALLOW_PERL_OPTIONS */
- New(666, fakeargv, argc + EXTRA_OPTIONS + 1, char *);
+ Newx(fakeargv, argc + EXTRA_OPTIONS + 1, char *);
fakeargv[0] = argv[0];
fakeargv[1] = "-e";
diff --git a/ext/B/C/C.xs b/ext/B/C/C.xs
index 92e4ce535f..b7fb7fad5f 100644
--- a/ext/B/C/C.xs
+++ b/ext/B/C/C.xs
@@ -16,7 +16,7 @@ my_runops(pTHX)
REGEXP* rx = PM_GETRE( (PMOP*)PL_op );
SV* rv = newSViv( 0 );
- New( 671, op, 1, PMOP );
+ Newx( op, 1, PMOP );
Copy( PL_op, op, 1, PMOP );
/* we need just the flags */
op->op_next = NULL;
diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h
index 70a7238347..99ffd7f22d 100644
--- a/ext/ByteLoader/bytecode.h
+++ b/ext/ByteLoader/bytecode.h
@@ -31,7 +31,7 @@ typedef char *pvindex;
#define BGET_PV(arg) STMT_START { \
BGET_U32(arg); \
if (arg) { \
- New(666, bstate->bs_pv.pvx, arg, char); \
+ Newx(bstate->bs_pv.pvx, arg, char); \
bl_read(bstate->bs_fdata, bstate->bs_pv.pvx, arg, 1); \
bstate->bs_pv.xpv.xpv_len = arg; \
bstate->bs_pv.xpv.xpv_cur = arg - 1; \
@@ -63,7 +63,7 @@ typedef char *pvindex;
#define BGET_op_tr_array(arg) do { \
unsigned short *ary, len; \
BGET_U16(len); \
- New(666, ary, len, unsigned short); \
+ Newx(ary, len, unsigned short); \
BGET_FREAD(ary, sizeof(unsigned short), len); \
arg = (char *) ary; \
} while (0)
diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c
index 065a0299d7..7c62351946 100644
--- a/ext/ByteLoader/byterun.c
+++ b/ext/ByteLoader/byterun.c
@@ -54,7 +54,7 @@ byterun(pTHX_ register struct byteloader_state *bstate)
SV *specialsv_list[6];
BYTECODE_HEADER_CHECK; /* croak if incorrect platform */
- New(666, bstate->bs_obj_list, 32, void*); /* set op objlist */
+ Newx(bstate->bs_obj_list, 32, void*); /* set op objlist */
bstate->bs_obj_list_fill = 31;
bstate->bs_obj_list[0] = NULL; /* first is always Null */
bstate->bs_ix = 1;
diff --git a/ext/Devel/DProf/DProf.xs b/ext/Devel/DProf/DProf.xs
index 39a604d920..f91e3c5c1b 100644
--- a/ext/Devel/DProf/DProf.xs
+++ b/ext/Devel/DProf/DProf.xs
@@ -738,7 +738,7 @@ BOOT:
g_key_hash = newSV(256);
g_prof_pid = (int)getpid();
- New(0, g_profstack, g_profstack_max, PROFANY);
+ Newx(g_profstack, g_profstack_max, PROFANY);
prof_recordheader(aTHX);
DBG_TIMER_NOTIFY("Profiler timer is on.\n");
g_orealtime = g_rprof_start = Times(&g_prof_start);
diff --git a/ext/DynaLoader/dl_aix.xs b/ext/DynaLoader/dl_aix.xs
index 43e0c0307e..ea6de7b198 100644
--- a/ext/DynaLoader/dl_aix.xs
+++ b/ext/DynaLoader/dl_aix.xs
@@ -228,7 +228,7 @@ void *dlopen(char *path, int mode)
mp->refCnt++;
return mp;
}
- Newz(1000,mp,1,Module);
+ Newxz(mp,1,Module);
if (mp == NULL) {
dl_errvalid++;
strcpy(dl_errbuf, "Newz: ");
@@ -568,7 +568,7 @@ static int readExports(ModulePtr mp)
continue;
mp->nExports++;
}
- Newz(1001, mp->exports, mp->nExports, Export);
+ Newxz(mp->exports, mp->nExports, Export);
if (mp->exports == NULL) {
dl_errvalid++;
strcpy(dl_errbuf, "readExports: ");
diff --git a/ext/DynaLoader/dl_next.xs b/ext/DynaLoader/dl_next.xs
index 078d92c8e3..265800b2af 100644
--- a/ext/DynaLoader/dl_next.xs
+++ b/ext/DynaLoader/dl_next.xs
@@ -163,7 +163,7 @@ static void TransferError(NXStream *s)
Safefree(dl_last_error);
}
NXGetMemoryBuffer(s, &buffer, &len, &maxlen);
- New(1097, dl_last_error, len, char);
+ Newx(dl_last_error, len, char);
strcpy(dl_last_error, buffer);
}
diff --git a/ext/DynaLoader/dl_vms.xs b/ext/DynaLoader/dl_vms.xs
index 03ddcb2441..4d2a93aca6 100644
--- a/ext/DynaLoader/dl_vms.xs
+++ b/ext/DynaLoader/dl_vms.xs
@@ -274,7 +274,7 @@ dl_load_file(filespec, flags)
specdsc.dsc$w_length = strlen(specdsc.dsc$a_pointer);
DLDEBUG(2,PerlIO_printf(Perl_debug_log, "\tVMS-ified filespec is %s\n",
specdsc.dsc$a_pointer));
- New(1399,dlptr,1,struct libref);
+ Newx(dlptr,1,struct libref);
dlptr->name.dsc$b_dtype = dlptr->defspec.dsc$b_dtype = DSC$K_DTYPE_T;
dlptr->name.dsc$b_class = dlptr->defspec.dsc$b_class = DSC$K_CLASS_S;
sts = sys$filescan(&specdsc,namlst,0);
@@ -288,7 +288,7 @@ dl_load_file(filespec, flags)
dlptr->name.dsc$w_length = namlst[0].len;
dlptr->name.dsc$a_pointer = savepvn(namlst[0].string,namlst[0].len);
dlptr->defspec.dsc$w_length = specdsc.dsc$w_length - namlst[0].len;
- New(1097, dlptr->defspec.dsc$a_pointer, dlptr->defspec.dsc$w_length + 1, char);
+ Newx(dlptr->defspec.dsc$a_pointer, dlptr->defspec.dsc$w_length + 1, char);
deflen = namlst[0].string - specdsc.dsc$a_pointer;
memcpy(dlptr->defspec.dsc$a_pointer,specdsc.dsc$a_pointer,deflen);
memcpy(dlptr->defspec.dsc$a_pointer + deflen,
diff --git a/ext/File/Glob/bsd_glob.c b/ext/File/Glob/bsd_glob.c
index 31d3aa45ac..78a8c647ec 100644
--- a/ext/File/Glob/bsd_glob.c
+++ b/ext/File/Glob/bsd_glob.c
@@ -332,7 +332,7 @@ bsd_glob(const char *pattern, int flags,
/* We operate on a copy of the pattern */
len = strlen(pattern);
- New(0, new_pat, len + 1, char);
+ Newx(new_pat, len + 1, char);
if (new_pat == NULL)
return (GLOB_NOSPACE);
@@ -1009,7 +1009,7 @@ globextend(const Char *path, glob_t *pglob, size_t *limitp)
if (pglob->gl_pathv)
pathv = Renew(pglob->gl_pathv,newsize,char*);
else
- New(0,pathv,newsize,char*);
+ Newx(pathv,newsize,char*);
if (pathv == NULL) {
if (pglob->gl_pathv) {
Safefree(pglob->gl_pathv);
@@ -1030,7 +1030,7 @@ globextend(const Char *path, glob_t *pglob, size_t *limitp)
;
len = (STRLEN)(p - path);
*limitp += len;
- New(0, copy, p-path, char);
+ Newx(copy, p-path, char);
if (copy != NULL) {
if (g_Ctoc(path, copy, len)) {
Safefree(copy);
diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs
index 95dedfff9d..695d3927c9 100644
--- a/ext/ODBM_File/ODBM_File.xs
+++ b/ext/ODBM_File/ODBM_File.xs
@@ -92,7 +92,7 @@ odbm_TIEHASH(dbtype, filename, flags, mode)
if (dbmrefcnt++)
croak("Old dbm can only open one database");
- New(0, tmpbuf, strlen(filename) + 5, char);
+ Newx(tmpbuf, strlen(filename) + 5, char);
SAVEFREEPV(tmpbuf);
sprintf(tmpbuf,"%s.dir",filename);
if (stat(tmpbuf, &PL_statbuf) < 0) {
diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs
index 50c0a4f02c..a699ebfde4 100644
--- a/ext/Opcode/Opcode.xs
+++ b/ext/Opcode/Opcode.xs
@@ -510,7 +510,7 @@ opmask_add(opset)
SV *opset
PREINIT:
if (!PL_op_mask)
- Newz(0, PL_op_mask, PL_maxo, char);
+ Newxz(PL_op_mask, PL_maxo, char);
CODE:
opmask_add(aTHX_ opset);
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 255be886bb..818e8618e2 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -586,7 +586,7 @@ new(packname = "POSIX::SigSet", ...)
CODE:
{
int i;
- New(0, RETVAL, 1, sigset_t);
+ Newx(RETVAL, 1, sigset_t);
sigemptyset(RETVAL);
for (i = 1; i < items; i++)
sigaddset(RETVAL, SvIV(ST(i)));
@@ -631,7 +631,7 @@ new(packname = "POSIX::Termios", ...)
CODE:
{
#ifdef I_TERMIOS
- New(0, RETVAL, 1, struct termios);
+ Newx(RETVAL, 1, struct termios);
#else
not_here("termios");
RETVAL = 0;
@@ -1328,7 +1328,7 @@ sigaction(sig, optaction, oldaction = 0)
sigset = INT2PTR(sigset_t*, tmp);
}
else {
- New(0, sigset, 1, sigset_t);
+ Newx(sigset, 1, sigset_t);
sv_setptrobj(*svp, sigset, "POSIX::SigSet");
}
*sigset = oact.sa_mask;
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 56443400f5..2650cac9a6 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -272,7 +272,7 @@ inet_ntoa(ip_address_sv)
* in HP-UX + GCC + 64bitint (returns "0.0.0.0"),
* so let's use this sprintf() workaround everywhere.
* This is also more threadsafe than using inet_ntoa(). */
- New(1138, addr_str, 4 * 3 + 3 + 1, char); /* IPv6? */
+ Newx(addr_str, 4 * 3 + 3 + 1, char); /* IPv6? */
sprintf(addr_str, "%d.%d.%d.%d",
((addr.s_addr >> 24) & 0xFF),
((addr.s_addr >> 16) & 0xFF),
diff --git a/ext/XS/Typemap/Typemap.xs b/ext/XS/Typemap/Typemap.xs
index 853b4abd2b..3e448676f3 100644
--- a/ext/XS/Typemap/Typemap.xs
+++ b/ext/XS/Typemap/Typemap.xs
@@ -48,7 +48,7 @@ static intOpq xst_anintopq;
/* T_ARRAY - allocate some memory */
intArray * intArrayPtr( int nelem ) {
intArray * array;
- New(0, array, nelem, intArray);
+ Newx(array, nelem, intArray);
return array;
}