X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlapi.pod;h=d608eef3c3c4003d765c503c95a60edf5a1de671;hb=77004dee2553ce034a8a58b2b2849e3656df46c3;hp=8b214d46bb3f40f5f71639e7ad36a253f0a0f3d7;hpb=794a0d33eec8a6056eaa14b2e6eae594c8004a65;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 8b214d4..d608eef 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -768,6 +768,17 @@ See L. =for hackers Found in file mathoms.c +=item pack_cat +X + +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, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) + +=for hackers +Found in file mathoms.c + =item sv_2pvbyte_nolen X @@ -973,6 +984,28 @@ being zero. See C. =for hackers Found in file mathoms.c +=item sv_usepvn +X + +Tells an SV to use C to find its string value. Implemented by +calling C with C of 0, hence does not handle 'set' +magic. See C. + + void sv_usepvn(SV* sv, char* ptr, STRLEN len) + +=for hackers +Found in file mathoms.c + +=item sv_usepvn_mg +X + +Like C, but also handles 'set' magic. + + void sv_usepvn_mg(SV *sv, char *ptr, STRLEN len) + +=for hackers +Found in file mathoms.c + =item sv_uv X @@ -984,6 +1017,17 @@ cope with complex macro expressions. Always use the macro instead. =for hackers Found in file mathoms.c +=item unpack_str +X + +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(const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags) + +=for hackers +Found in file mathoms.c + =back @@ -1002,17 +1046,6 @@ The engine implementing pack() Perl function. =for hackers Found in file pp_pack.c -=item pack_cat -X - -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, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) - -=for hackers -Found in file pp_pack.c - =item unpackstring X @@ -1025,17 +1058,6 @@ Issue C before and C after the call to this function. =for hackers Found in file pp_pack.c -=item unpack_str -X - -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(const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags) - -=for hackers -Found in file pp_pack.c - =back @@ -2099,8 +2121,8 @@ X Perl's version of what C would be if it existed. Returns a pointer to a newly allocated string which is a duplicate of the first -C bytes from C. The memory allocated for the new string can be -freed with the C function. +C bytes from C, plus a trailing NUL byte. The memory allocated for +the new string can be freed with the C function. char* savepvn(const char* pv, I32 len) @@ -2703,7 +2725,8 @@ Found in file op.c =item newXS X -Used by C to hook up XSUBs as Perl subs. +Used by C to hook up XSUBs as Perl subs. I needs to be +static storage, as it is used directly as CvFILE(), without a copy being made. =for hackers Found in file op.c @@ -3503,6 +3526,20 @@ See C. Access the character as *(SvEND(sv)). =for hackers Found in file sv.h +=item SvGAMAGIC +X + +Returns true if the SV has get magic or overloading. If either is true then +the scalar is active data, and has the potential to return a new value every +time it is accessed. Hence you must be careful to only read it once per user +logical operation and work with that returned value. If neither is true then +the scalar's value cannot change unless written to. + + char* SvGAMAGIC(SV* sv) + +=for hackers +Found in file sv.h + =item SvGROW X @@ -5722,30 +5759,24 @@ You generally want to use the C macro wrapper. See also C. =for hackers Found in file sv.c -=item sv_usepvn -X +=item sv_usepvn_flags +X Tells an SV to use C to find its string value. Normally the string is stored inside the SV but sv_usepvn allows the SV to use an outside string. The C should point to memory that was allocated -by C. The string length, C, must be supplied. This -function will realloc (i.e. move) the memory pointed to by C, +by C. The string length, C, must be supplied. By default +this function will realloc (i.e. move) the memory pointed to by C, so that pointer should not be freed or used by the programmer after giving it to sv_usepvn, and neither should any pointers from "behind" -that pointer (e.g. ptr + 1) be used. Does not handle 'set' magic. -See C. - - void sv_usepvn(SV* sv, char* ptr, STRLEN len) - -=for hackers -Found in file sv.c - -=item sv_usepvn_mg -X +that pointer (e.g. ptr + 1) be used. -Like C, but also handles 'set' magic. +If C & SV_SMAGIC is true, will call SvSETMAGIC. If C & +SV_HAS_TRAILING_NUL is true, then C must be NUL, and the realloc +will be skipped. (i.e. the buffer is actually at least 1 byte longer than +C, and already meets the requirements for storing in C) - void sv_usepvn_mg(SV *sv, char *ptr, STRLEN len) + void sv_usepvn_flags(SV* sv, char* ptr, STRLEN len, U32 flags) =for hackers Found in file sv.c @@ -6298,6 +6329,8 @@ Unlike C, this over-writes the original string, and updates len to contain the new length. Returns zero on failure, setting C to -1. +If you need a copy of the string, see C. + NOTE: this function is experimental and may change or be removed without notice.