X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlapi.pod;h=93d1cfb16f5456e97dbb6ae170aa346b07c69589;hb=6bdd71ef1830fa9fb85306405e4da0222df1321d;hp=695a44c987e87aac059e96821b081280827e726d;hpb=7e8c5daceba7cb185532328a3b67d4ca7ba4811b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 695a44c..93d1cfb 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -687,7 +687,7 @@ Found in file perl.c Tells Perl to C the file named by the string argument. It is analogous to the Perl code C. It's even -implemented that way; consider using Perl_load_module instead. +implemented that way; consider using load_module instead. NOTE: the perl_ form of this function is deprecated. @@ -704,19 +704,39 @@ Found in file perl.c =over 8 -=item pack_cat +=item packlist The engine implementing pack() Perl function. + void packlist(SV *cat, char *pat, char *patend, SV **beglist, SV **endlist) + +=for hackers +Found in file pp_pack.c + +=item pack_cat + +The engine implementing pack() Perl function. Note: parameters next_in_list and +flags are not used. This call should not be used; use packlist instead. + void pack_cat(SV *cat, char *pat, char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) =for hackers Found in file pp_pack.c -=item unpack_str +=item unpackstring The engine implementing unpack() Perl function. + I32 unpackstring(char *pat, char *patend, char *s, char *strend, U32 flags) + +=for hackers +Found in file pp_pack.c + +=item unpack_str + +The engine implementing unpack() Perl function. Note: parameters strbeg, new_s +and ocnt are not used. This call should not be used, use unpackstring instead. + I32 unpack_str(char *pat, char *patend, char *s, char *strbeg, char *strend, char **new_s, I32 ocnt, U32 flags) =for hackers @@ -915,6 +935,7 @@ Found in file hv.h =item Nullch Null character pointer. + =for hackers Found in file handy.h @@ -2740,6 +2761,27 @@ Returns a boolean indicating whether the SV contains an unsigned integer. =for hackers Found in file sv.h +=item SvIsCOW + +Returns a boolean indicating whether the SV is Copy-On-Write. (either shared +hash key scalars, or full Copy On Write scalars if 5.9.0 is configured for +COW) + + bool SvIsCOW(SV* sv) + +=for hackers +Found in file sv.h + +=item SvIsCOW_shared_hash + +Returns a boolean indicating whether the SV is Copy-On-Write shared hash key +scalar. + + bool SvIsCOW_shared_hash(SV* sv) + +=for hackers +Found in file sv.h + =item SvIV Coerces the given SV to an integer and returns it. See C for a @@ -2991,7 +3033,6 @@ Like C, but converts sv to byte representation first if necessary. Guarantees to evaluate sv only once; use the more efficient C otherwise. - char* SvPVbytex(SV* sv, STRLEN len) =for hackers @@ -3640,6 +3681,8 @@ Efficient removal of characters from the beginning of the string buffer. SvPOK(sv) must be true and the C must be a pointer to somewhere inside the string buffer. The C becomes the first character of the adjusted string. Uses the "OOK hack". +Beware: after this function returns, C and SvPVX(sv) may no longer +refer to the same chunk of data. void sv_chop(SV* sv, char* ptr) @@ -3764,7 +3807,7 @@ an xpvmg; if we're a copy-on-write scalar, this is the on-write time when we do the copy, and is also used locally. If C is set then a copy-on-write scalar drops its PV buffer (if any) and becomes SvPOK_off rather than making a copy. (Used where this scalar is about to be -set to some other value. In addtion, the C parameter gets passed to +set to some other value.) In addition, the C parameter gets passed to C when unrefing. C calls this function with flags set to 0. @@ -4237,6 +4280,25 @@ Like C, but also handles 'set' magic. =for hackers Found in file sv.c +=item sv_setpviv + +Copies an integer into the given SV, also updating its string value. +Does not handle 'set' magic. See C. + + void sv_setpviv(SV* sv, IV num) + +=for hackers +Found in file sv.c + +=item sv_setpviv_mg + +Like C, but also handles 'set' magic. + + void sv_setpviv_mg(SV *sv, IV iv) + +=for hackers +Found in file sv.c + =item sv_setpvn Copies a string into an SV. The C parameter indicates the number of @@ -4708,6 +4770,9 @@ Converts a string C of length C from ASCII into UTF8 encoding. Returns a pointer to the newly-created string, and sets C to reflect the new length. +If you want to convert to UTF8 from other encodings than ASCII, +see sv_recode_to_utf8(). + NOTE: this function is experimental and may change or be removed without notice. @@ -4758,10 +4823,10 @@ Found in file utf8.c =item is_utf8_string -Returns true if first C bytes of the given string form a valid UTF8 -string, false otherwise. Note that 'a valid UTF8 string' does not mean -'a string that contains UTF8' because a valid ASCII string is a valid -UTF8 string. +Returns true if first C bytes of the given string form a valid +UTF8 string, false otherwise. Note that 'a valid UTF8 string' does +not mean 'a string that contains code points above 0x7F encoded in +UTF8' because a valid ASCII string is a valid UTF8 string. bool is_utf8_string(U8 *s, STRLEN len) @@ -4788,6 +4853,23 @@ The pointer to the PV of the dsv is returned. =for hackers Found in file utf8.c +=item sv_cat_decode + +The encoding is assumed to be an Encode object, the PV of the ssv is +assumed to be octets in that encoding and decoding the input starts +from the position which (PV + *offset) pointed to. The dsv will be +concatenated the decoded UTF-8 string from ssv. Decoding will terminate +when the string tstr appears in decoding output or the input ends on +the PV of the ssv. The value which the offset points will be modified +to the last input position on the ssv. + +Returns TRUE if the terminator was found, else returns FALSE. + + bool sv_cat_decode(SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen) + +=for hackers +Found in file sv.c + =item sv_recode_to_utf8 The encoding is assumed to be an Encode object, on entry the PV