$var.size = (int)sizeof(recno_t);
}
else if (SvOK(my_sv)) {
- $var.data = SvPVbyte(my_sv, PL_na);
- $var.size = (int)PL_na;
+ STRLEN len;
+ $var.data = SvPVbyte(my_sv, len);
+ $var.size = (int)len;
}
}
T_dbtdatum
DBT_clear($var) ;
SvGETMAGIC(my_sv) ;
if (SvOK(my_sv)) {
- $var.data = SvPVbyte(my_sv, PL_na);
- $var.size = (int)PL_na;
+ STRLEN len;
+ $var.data = SvPVbyte(my_sv, len);
+ $var.size = (int)len;
}
}
INPUT
T_DATUM_K
DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ {
+ STRLEN len;
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
+ }
T_DATUM_K_C
{
SV * tmpSV;
+ STRLEN len;
if (db->filter_store_key) {
tmpSV = sv_2mortal(newSVsv($arg));
DBM_ckFilter(tmpSV, filter_store_key, \"filter_store_key\");
}
else
tmpSV = $arg;
- $var.dptr = SvPVbyte(tmpSV, PL_na);
- $var.dsize = (int)PL_na;
+ $var.dptr = SvPVbyte(tmpSV, len);
+ $var.dsize = (int)len;
}
T_DATUM_V
DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
if (SvOK($arg)) {
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ STRLEN len;
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
}
else {
$var.dptr = (char *)\"\";
INPUT
T_DATUM_K
- DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ {
+ STRLEN len;
+ DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
+ }
T_DATUM_V
DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
if (SvOK($arg)) {
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ STRLEN len;
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
}
else {
$var.dptr = (char *)\"\";
INPUT
T_DATUM_K
- DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ {
+ STRLEN len;
+3B DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
+ }
T_DATUM_K_C
{
SV * tmpSV ;
+ STRLEN len;
if (db->filter_store_key){
tmpSV = sv_2mortal(newSVsv($arg));
DBM_ckFilter(tmpSV, filter_store_key, \"filter_store_key\");
}
else
tmpSV = $arg;
- $var.dptr = SvPVbyte(tmpSV, PL_na);
- $var.dsize = (int)PL_na;
+ $var.dptr = SvPVbyte(tmpSV, len);
+ $var.dsize = (int)len;
}
T_DATUM_V
DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
if (SvOK($arg)) {
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ STRLEN len;
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
}
else {
$var.dptr = \"\";
INPUT
T_DATUM_K
- DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ {
+ STRLEN len;
+ DBM_ckFilter($arg, filter_store_key, \"filter_store_key\");
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
+ }
T_DATUM_V
DBM_ckFilter($arg, filter_store_value, \"filter_store_value\");
if (SvOK($arg)) {
- $var.dptr = SvPVbyte($arg, PL_na);
- $var.dsize = (int)PL_na;
+ STRLEN len;
+ $var.dptr = SvPVbyte($arg, len);
+ $var.dsize = (int)len;
}
else {
$var.dptr = \"\";
#define null_arg(sv) ( SvROK(sv) && SVt_PVAV == SvTYPE(SvRV(sv)) \
&& -1 == av_len((AV*)SvRV(sv)) )
-#define PV_or_null(sv) ( null_arg(sv) ? NULL : SvPV(sv,PL_na) )
+#define PV_or_null(sv) ( null_arg(sv) ? NULL : SvPV_nolen(sv) )
/* Minimum buffer size to use when no buffer existed: */
#define MIN_GROW_SIZE 128
/* Whether the buffer size we got lets us change what buffer size we use: */
#define autosize(sv) (!( SvOK(sv) && ! SvROK(sv) \
- && SvPV(sv,PL_na) && '=' == *SvPV(sv,PL_na) ))
+ && SvPV_nolen(sv) && '=' == *SvPV_nolen(sv) ))
/* Get the IV/UV for a parameter that might be C<[]> or C<undef>: */
#define optIV(sv) ( null_arg(sv) ? 0 : !SvOK(sv) ? 0 : SvIV(sv) )
/* Initialize a buffer size argument of type DWORD: */
#define init_buf_l( svSize ) \
( null_arg(svSize) ? 0 : autosize(svSize) ? optUV(svSize) \
- : strtoul( 1+SvPV(svSize,PL_na), NULL, 10 ) )
+ : strtoul( 1+SvPV_nolen(svSize), NULL, 10 ) )
/* In INPUT section put "= init_buf_l($arg);" after variable name. */
/* Lengths in WCHARs are initialized the same as lengths in bytes: */
if( null_arg($arg) )
$var= NULL;
else
- $var= ($type) SvPV( $arg, PL_na )
+ $var= ($type) SvPV_nolen( $arg )
T_SBUF
grow_buf( $var,$arg, $type )
T_IV
#############################################################################
INPUT
T_PVNULL
- $var = ( SvOK($arg) ? ($type)SvPV($arg,PL_na) : NULL )
+ $var = ( SvOK($arg) ? ($type)SvPV_nolen($arg) : NULL )
T_PVNULLC
- $var = ( SvOK($arg) ? ($type)SvPV($arg,PL_na) : NULL )
+ $var = ( SvOK($arg) ? ($type)SvPV_nolen($arg) : NULL )
#############################################################################
OUTPUT
T_PVNULL
Perl_croak(aTHX_ "Usage: OS2::pipe(pszName, ulOpenMode, connect= 1, count= 1, ulInbufLength= 8192, ulOutbufLength= ulInbufLength, ulPipeMode= count | NP_NOWAIT | NP_TYPE_BYTE | NP_READMODE_BYTE, ulTimeout= 0)");
{
ULONG RETVAL;
- PCSZ pszName = ( SvOK(ST(0)) ? (PCSZ)SvPV(ST(0),PL_na) : NULL );
+ PCSZ pszName = ( SvOK(ST(0)) ? (PCSZ)SvPV_nolen(ST(0)) : NULL );
HPIPE hpipe;
SV *OpenMode = ST(1);
ULONG ulOpenMode;
ULONG rc;
#line 113 "pipe.c"
ULONG RETVAL;
- PCSZ pszFileName = ( SvOK(ST(0)) ? (PCSZ)SvPV(ST(0),PL_na) : NULL );
+ PCSZ pszFileName = ( SvOK(ST(0)) ? (PCSZ)SvPV_nolen(ST(0)) : NULL );
HFILE hFile;
ULONG ulAction;
ULONG ulOpenMode = (ULONG)SvUV(ST(1));
These tasks would need a little C knowledge, but don't need any specific
background or experience with XS, or how the Perl interpreter works
-=head2 Exterminate PL_na!
-
-C<PL_na> festers still in the darkest corners of various typemap files.
-It needs to be exterminated, replaced by a local variable of type C<STRLEN>.
-
=head2 Modernize the order of directories in @INC
The way @INC is laid out by default, one cannot upgrade core (dual-life)
bool_t
rpcb_gettime(host,timep)
- char *host = (char *)SvPV($arg,PL_na);
+ char *host = (char *)SvPV_nolen($arg);
time_t &timep = 0;
OUTPUT:
timep
bool_t
rpcb_gettime(host,timep)
time_t &timep; /* \$v{timep}=@{[$v{timep}=$arg]} */
- char *host + SvOK($v{timep}) ? SvPV($arg,PL_na) : NULL;
+ char *host + SvOK($v{timep}) ? SvPV_nolen($arg) : NULL;
OUTPUT:
timep
if (counter) {
strcat(work_name, "__");
}
- strcat(work_name, SvPV(*av_fetch(in_array, counter, FALSE),
- PL_na));
+ strcat(work_name, SvPV_nolen(*av_fetch(in_array, counter, FALSE)));
}
/* Check to see if we actually have to bother...*/