len);>. It might work with your compiler, but it won't work for everyone.
Break this sort of statement up into separate assignments:
+ SV *s;
STRLEN len;
char * ptr;
- ptr = SvPV(len);
+ ptr = SvPV(s, len);
foo(ptr, len);
If you want to know if the scalar value is TRUE, you can use:
SAVEDELETE(PL_defstash, savepv(tmpbuf), strlen(tmpbuf));
-=item C<SAVEDESTRUCTOR(f,p)>
+=item C<SAVEDESTRUCTOR(DESTRUCTORFUNC_NOCONTEXT_t f, void *p)>
At the end of I<pseudo-block> the function C<f> is called with the
-only argument (of type C<void*>) C<p>.
+only argument C<p>.
+
+=item C<SAVEDESTRUCTOR_X(DESTRUCTORFUNC_t f, void *p)>
+
+At the end of I<pseudo-block> the function C<f> is called with the
+implicit context argument (if any), and C<p>.
=item C<SAVESTACK_POS()>
Test two strings to see if they are equal. The C<len> parameter indicates
the number of bytes to compare. Returns true or false.
+(A wrapper for C<strncmp>).
- int strnEQ( char *s1, char *s2 )
+ int strnEQ( const char *s1, const char *s2, size_t len )
=item strnNE
Test two strings to see if they are different. The C<len> parameter
indicates the number of bytes to compare. Returns true or false.
+(A wrapper for C<strncmp>).
- int strnNE( char *s1, char *s2, int len )
+ int strnNE( const char *s1, const char *s2, size_t len )
=item sv_2mortal
void sv_usepvn_mg (SV* sv, char* ptr, STRLEN len)
-=item sv_vcatpvfn(sv, pat, patlen, args, svargs, svmax, used_locale)
+=item sv_vcatpvfn
Processes its arguments like C<vsprintf> and appends the formatted output
to an SV. Uses an array of SVs if the C style variable argument list is
-missing (NULL). Indicates if locale information has been used for formatting.
+missing (NULL). When running with taint checks enabled, indicates via
+C<maybe_tainted> if results are untrustworthy (often due to the use of
+locales).
void sv_catpvfn (SV* sv, const char* pat, STRLEN patlen,
va_list *args, SV **svargs, I32 svmax,
- bool *used_locale);
+ bool *maybe_tainted);
-=item sv_vsetpvfn(sv, pat, patlen, args, svargs, svmax, used_locale)
+=item sv_vsetpvfn
Works like C<vcatpvfn> but copies the text into the SV instead of
appending it.
void sv_setpvfn (SV* sv, const char* pat, STRLEN patlen,
va_list *args, SV **svargs, I32 svmax,
- bool *used_locale);
+ bool *maybe_tainted);
=item SvUV