void
Perl_deb(pTHX_ const char *pat, ...)
{
-#ifdef DEBUGGING
va_list args;
va_start(args, pat);
+#ifdef DEBUGGING
vdeb(pat, &args);
- va_end(args);
#else
PERL_UNUSED_CONTEXT;
- PERL_UNUSED_ARG(pat);
#endif /* DEBUGGING */
+ va_end(args);
}
void
#else
dTHX;
#endif
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+ va_list args;
+#endif
#ifdef FAKE_PERSISTENT_SIGNAL_HANDLERS
(void) rsignal(sig, PL_csighandlerp);
if (PL_sig_ignoring[sig]) return;
exit(1);
#endif
#endif
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+ va_start(args, sig);
+#endif
if (
#ifdef SIGILL
sig == SIGILL ||
(*PL_sighandlerp)(sig);
else
S_raise_signal(aTHX_ sig);
+#if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+ va_end(args);
+#endif
}
#if defined(FAKE_PERSISTENT_SIGNAL_HANDLERS) || defined(FAKE_DEFAULT_SIGNAL_HANDLERS)
PL_modcount = 0;
/* Grandfathering $[ assignment here. Bletch.*/
/* Only simple assignments like C<< ($[) = 1 >> are allowed */
- PL_eval_start = (left->op_type == OP_CONST) ? right : 0;
+ PL_eval_start = (left->op_type == OP_CONST) ? right : NULL;
left = mod(left, OP_AASSIGN);
if (PL_eval_start)
PL_eval_start = 0;
Creates a new SV with its SvPVX_const pointing to a shared string in the string
table. If the string does not already exist in the table, it is created
-first. Turns on READONLY and FAKE. The string's hash is stored in the UV
-slot of the SV; if the C<hash> parameter is non-zero, that value is used;
-otherwise the hash is computed. The idea here is that as the string table
-is used for shared hash keys these strings will have SvPVX_const == HeKEY and
-hash lookup will avoid string compare.
+first. Turns on READONLY and FAKE. If the C<hash> parameter is non-zero, that
+value is used; otherwise the hash is computed. The string's hash can be later
+be retrieved from the SV with the C<SvSHARED_HASH()> macro. The idea here is
+that as the string table is used for shared hash keys these strings will have
+SvPVX_const == HeKEY and hash lookup will avoid string compare.
SV* newSVpvn_share(const char* s, I32 len, U32 hash)
}
he = hv_fetch_ent(hv, keysv, lval, 0);
- svp = he ? &HeVAL(he) : 0;
+ svp = he ? &HeVAL(he) : NULL;
if (lval) {
if (!svp || *svp == &PL_sv_undef) {
}
else {
tmpsv = TOPs;
- tmps = SvROK(tmpsv) ? NULL : SvPV_const(tmpsv, len);
+ tmps = SvROK(tmpsv) ? (const char *)NULL : SvPV_const(tmpsv, len);
}
if (!tmps || !len) {
SV * const error = ERRSV;
{
dTHX;
void *retptr = NULL;
+ va_list ap;
+ va_start(ap, f);
#ifdef USE_REENTRANT_API
# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
void *p0;
# if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
int anint;
# endif
- va_list ap;
-
- va_start(ap, f);
switch (PL_op->op_type) {
#ifdef USE_HOSTENT_BUFFER
/* Not known how to retry, so just fail. */
break;
}
-
- va_end(ap);
#else
PERL_UNUSED_ARG(f);
#endif
+ va_end(ap);
return retptr;
}
{
dTHX;
void *retptr = NULL;
+ va_list ap;
+ va_start(ap, f);
#ifdef USE_REENTRANT_API
# if defined(USE_HOSTENT_BUFFER) || defined(USE_GRENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PWENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
void *p0;
# if defined(USE_HOSTENT_BUFFER) || defined(USE_NETENT_BUFFER) || defined(USE_PROTOENT_BUFFER) || defined(USE_SERVENT_BUFFER)
int anint;
# endif
- va_list ap;
-
- va_start(ap, f);
switch (PL_op->op_type) {
#ifdef USE_HOSTENT_BUFFER
/* Not known how to retry, so just fail. */
break;
}
-
- va_end(ap);
#else
PERL_UNUSED_ARG(f);
#endif
+ va_end(ap);
return retptr;
}
* documentation of these array elements. */
si = *ary;
- a = SvROK(ary[1]) ? &ary[1] : 0;
- b = SvTYPE(ary[2]) == SVt_PVAV ? &ary[2] : 0;
+ a = SvROK(ary[1]) ? &ary[1] : NULL;
+ b = SvTYPE(ary[2]) == SVt_PVAV ? &ary[2] : NULL;
if (a)
sw = *a;
if (PL_utf8cache) {
STRLEN ulen;
- MAGIC *mg = SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : 0;
+ MAGIC *mg = SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : NULL;
if (mg && mg->mg_len != -1) {
ulen = mg->mg_len;