my($fh, $name, $docref) = @_;
my($flags, $docs, $ret, $file, @args) = @$docref;
+ $docs .= "NOTE: this function is experimental and may change or be
+removed without notice.\n\n" if $flags =~ /x/;
$docs .= "NOTE: the perl_ form of this function is deprecated.\n\n"
if $flags =~ /p/;
if ($flags =~ /A/) {
my $docref = delete $docfuncs{$func};
warn "no docs for $func\n" unless $docref and @$docref;
+ $docref->[0].="x" if $flags =~ /M/;
$apidocs{$func} = [$docref->[0] . 'A', $docref->[1], $retval,
$docref->[3], @args];
} else {
: o has no compatibility macro (#define foo Perl_foo)
: j not a member of CPerlObj
: x not exported
+: M may change
:
: Individual flags may be separated by whitespace.
:
Ap |char* |sv_pvn |SV *sv|STRLEN *len
Ap |char* |sv_pvutf8n |SV *sv|STRLEN *len
Ap |char* |sv_pvbyten |SV *sv|STRLEN *len
-Ap |I32 |sv_true |SV *sv
+Apd |I32 |sv_true |SV *sv
p |void |sv_add_arena |char* ptr|U32 size|U32 flags
Ap |int |sv_backoff |SV* sv
Apd |SV* |sv_bless |SV* sv|HV* stash
Apd |void |sv_chop |SV* sv|char* ptr
p |void |sv_clean_all
p |void |sv_clean_objs
-Ap |void |sv_clear |SV* sv
+Apd |void |sv_clear |SV* sv
Apd |I32 |sv_cmp |SV* sv1|SV* sv2
-Ap |I32 |sv_cmp_locale |SV* sv1|SV* sv2
+Apd |I32 |sv_cmp_locale |SV* sv1|SV* sv2
#if defined(USE_LOCALE_COLLATE)
Ap |char* |sv_collxfrm |SV* sv|STRLEN* nxp
#endif
Ap |void |sv_dump |SV* sv
Apd |bool |sv_derived_from|SV* sv|const char* name
Apd |I32 |sv_eq |SV* sv1|SV* sv2
-Ap |void |sv_free |SV* sv
+Apd |void |sv_free |SV* sv
p |void |sv_free_arenas
-Ap |char* |sv_gets |SV* sv|PerlIO* fp|I32 append
+Apd |char* |sv_gets |SV* sv|PerlIO* fp|I32 append
Apd |char* |sv_grow |SV* sv|STRLEN newlen
Apd |void |sv_inc |SV* sv
Apd |void |sv_insert |SV* bigsv|STRLEN offset|STRLEN len \
Apd |int |sv_isa |SV* sv|const char* name
Apd |int |sv_isobject |SV* sv
Apd |STRLEN |sv_len |SV* sv
-Ap |STRLEN |sv_len_utf8 |SV* sv
+Apd |STRLEN |sv_len_utf8 |SV* sv
Apd |void |sv_magic |SV* sv|SV* obj|int how|const char* name \
|I32 namlen
Apd |SV* |sv_mortalcopy |SV* oldsv
Ap |char* |sv_peek |SV* sv
Ap |void |sv_pos_u2b |SV* sv|I32* offsetp|I32* lenp
Ap |void |sv_pos_b2u |SV* sv|I32* offsetp
-Ap |char* |sv_pvn_force |SV* sv|STRLEN* lp
-Ap |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp
+Apd |char* |sv_pvn_force |SV* sv|STRLEN* lp
+Apd |char* |sv_pvutf8n_force|SV* sv|STRLEN* lp
Ap |char* |sv_pvbyten_force|SV* sv|STRLEN* lp
-Ap |char* |sv_reftype |SV* sv|int ob
-Ap |void |sv_replace |SV* sv|SV* nsv
+Apd |char* |sv_reftype |SV* sv|int ob
+Apd |void |sv_replace |SV* sv|SV* nsv
Ap |void |sv_report_used
Ap |void |sv_reset |char* s|HV* stash
Afpd |void |sv_setpvf |SV* sv|const char* pat|...
Apd |void |sv_setsv |SV* dsv|SV* ssv
Ap |void |sv_taint |SV* sv
Ap |bool |sv_tainted |SV* sv
-Ap |int |sv_unmagic |SV* sv|int type
+Apd |int |sv_unmagic |SV* sv|int type
Apd |void |sv_unref |SV* sv
Ap |void |sv_untaint |SV* sv
Apd |bool |sv_upgrade |SV* sv|U32 mt
Ap |U8* |utf16_to_utf8_reversed|U16* p|U8 *d|I32 bytelen
Ap |I32 |utf8_distance |U8 *a|U8 *b
Ap |U8* |utf8_hop |U8 *s|I32 off
-Ap |U8* |utf8_to_bytes |U8 *s|STRLEN len
-Ap |U8* |bytes_to_utf8 |U8 *s|STRLEN *len
+ApM |U8* |utf8_to_bytes |U8 *s|STRLEN len
+ApM |U8* |bytes_to_utf8 |U8 *s|STRLEN *len
Ap |UV |utf8_to_uv |U8 *s|I32* retlen
Ap |U8* |uv_to_utf8 |U8 *d|UV uv
p |void |vivify_defelem |SV* sv
Ap |char* |sv_pv |SV *sv
Ap |char* |sv_pvutf8 |SV *sv
Ap |char* |sv_pvbyte |SV *sv
-Ap |void |sv_utf8_upgrade|SV *sv
-Ap |bool |sv_utf8_downgrade|SV *sv|bool fail_ok
-Ap |void |sv_utf8_encode |SV *sv
+Apd |void |sv_utf8_upgrade|SV *sv
+ApdM |bool |sv_utf8_downgrade|SV *sv|bool fail_ok
+ApdM |void |sv_utf8_encode |SV *sv
Ap |bool |sv_utf8_decode |SV *sv
Ap |void |sv_force_normal|SV *sv
Ap |void |tmps_grow |I32 n
-Ap |SV* |sv_rvweaken |SV *sv
+Apd |SV* |sv_rvweaken |SV *sv
p |int |magic_killbackrefs|SV *sv|MAGIC *mg
Ap |OP* |newANONATTRSUB |I32 floor|OP *proto|OP *attrs|OP *block
Ap |CV* |newATTRSUB |I32 floor|OP *o|OP *proto|OP *attrs|OP *block
=for hackers
Found in file sv.h
-=item SvTYPE
-
-Returns the type of the SV. See C<svtype>.
+=item svtype
- svtype SvTYPE(SV* sv)
+An enum of flags for Perl types. These are found in the file B<sv.h>
+in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
=for hackers
Found in file sv.h
-=item svtype
+=item SvTYPE
-An enum of flags for Perl types. These are found in the file B<sv.h>
-in the C<svtype> enum. Test these flags with the C<SvTYPE> macro.
+Returns the type of the SV. See C<svtype>.
+
+ svtype SvTYPE(SV* sv)
=for hackers
Found in file sv.h
=for hackers
Found in file sv.c
+=item sv_clear
+
+Clear an SV, making it empty. Does not free the memory used by the SV
+itself.
+
+ void sv_clear(SV* sv)
+
+=for hackers
+Found in file sv.c
+
=item sv_cmp
Compares the strings in two SVs. Returns -1, 0, or 1 indicating whether the
=for hackers
Found in file sv.c
+=item sv_cmp_locale
+
+Compares the strings in two SVs in a locale-aware manner. See
+L</sv_cmp_locale>
+
+ I32 sv_cmp_locale(SV* sv1, SV* sv2)
+
+=for hackers
+Found in file sv.c
+
=item sv_dec
Auto-decrement of the value in the SV.
=for hackers
Found in file sv.c
+=item sv_free
+
+Free the memory used by an SV.
+
+ void sv_free(SV* sv)
+
+=for hackers
+Found in file sv.c
+
+=item sv_gets
+
+Get a line from the filehandle and store it into the SV, optionally
+appending to the currently-stored string.
+
+ char* sv_gets(SV* sv, PerlIO* fp, I32 append)
+
+=for hackers
+Found in file sv.c
+
=item sv_grow
Expands the character buffer in the SV. This will use C<sv_unref> and will
=for hackers
Found in file sv.c
+=item sv_len_utf8
+
+Returns the number of characters in the string in an SV, counting wide
+UTF8 bytes as a single character.
+
+ STRLEN sv_len_utf8(SV* sv)
+
+=for hackers
+Found in file sv.c
+
=item sv_magic
Adds magic to an SV.
=for hackers
Found in file sv.c
+=item sv_pvn_force
+
+Get a sensible string out of the SV somehow.
+
+ char* sv_pvn_force(SV* sv, STRLEN* lp)
+
+=for hackers
+Found in file sv.c
+
+=item sv_pvutf8n_force
+
+Get a sensible UTF8-encoded string out of the SV somehow. See
+L</sv_pvn_force>.
+
+ char* sv_pvutf8n_force(SV* sv, STRLEN* lp)
+
+=for hackers
+Found in file sv.c
+
+=item sv_reftype
+
+Returns a string describing what the SV is a reference to.
+
+ char* sv_reftype(SV* sv, int ob)
+
+=for hackers
+Found in file sv.c
+
+=item sv_replace
+
+Make the first argument a copy of the second, then delete the original.
+
+ void sv_replace(SV* sv, SV* nsv)
+
+=for hackers
+Found in file sv.c
+
+=item sv_rvweaken
+
+Weaken a reference.
+
+ SV* sv_rvweaken(SV *sv)
+
+=for hackers
+Found in file sv.c
+
=item sv_setiv
Copies an integer into the given SV. Does not handle 'set' magic. See
=for hackers
Found in file sv.c
+=item sv_true
+
+Returns true if the SV has a true value by Perl's rules.
+
+ I32 sv_true(SV *sv)
+
+=for hackers
+Found in file sv.c
+
+=item sv_unmagic
+
+Removes magic from an SV.
+
+ int sv_unmagic(SV* sv, int type)
+
+=for hackers
+Found in file sv.c
+
=item sv_unref
Unsets the RV status of the SV, and decrements the reference count of
=for hackers
Found in file sv.c
+=item sv_utf8_downgrade
+
+Attempt to convert the PV of an SV from UTF8-encoded to byte encoding.
+This may not be possible if the PV contains non-byte encoding characters;
+if this is the case, either returns false or, if C<fail_ok> is not
+true, croaks.
+
+NOTE: this function is experimental and may change or be
+removed without notice.
+
+ bool sv_utf8_downgrade(SV *sv, bool fail_ok)
+
+=for hackers
+Found in file sv.c
+
+=item sv_utf8_encode
+
+Convert the PV of an SV to UTF8-encoded, but then turn off the C<SvUTF8>
+flag so that it looks like bytes again. Nothing calls this.
+
+NOTE: this function is experimental and may change or be
+removed without notice.
+
+ void sv_utf8_encode(SV *sv)
+
+=for hackers
+Found in file sv.c
+
+=item sv_utf8_upgrade
+
+Convert the PV of an SV to its UTF8-encoded form.
+
+ void sv_utf8_upgrade(SV *sv)
+
+=for hackers
+Found in file sv.c
+
=item sv_vcatpvfn
Processes its arguments like C<vsprintf> and appends the formatted output
}
}
+/*
+=for apidoc sv_utf8_upgrade
+
+Convert the PV of an SV to its UTF8-encoded form.
+
+=cut
+*/
+
void
Perl_sv_utf8_upgrade(pTHX_ register SV *sv)
{
}
}
+/*
+=for apidoc sv_utf8_downgrade
+
+Attempt to convert the PV of an SV from UTF8-encoded to byte encoding.
+This may not be possible if the PV contains non-byte encoding characters;
+if this is the case, either returns false or, if C<fail_ok> is not
+true, croaks.
+
+=cut
+*/
+
bool
Perl_sv_utf8_downgrade(pTHX_ register SV* sv, bool fail_ok)
{
return TRUE;
}
+/*
+=for apidoc sv_utf8_encode
+
+Convert the PV of an SV to UTF8-encoded, but then turn off the C<SvUTF8>
+flag so that it looks like bytes again. Nothing calls this.
+
+=cut
+*/
+
void
Perl_sv_utf8_encode(pTHX_ register SV *sv)
{
SvFLAGS(sv) &= ~(SVf_IOK|SVf_NOK|SVf_POK);
}
+/*
+=for apidoc sv_unmagic
+
+Removes magic from an SV.
+
+=cut
+*/
+
int
Perl_sv_unmagic(pTHX_ SV *sv, int type)
{
return 0;
}
+/*
+=for apidoc sv_rvweaken
+
+Weaken a reference.
+
+=cut
+*/
+
SV *
Perl_sv_rvweaken(pTHX_ SV *sv)
{
SvSETMAGIC(bigstr);
}
-/* make sv point to what nstr did */
+/*
+=for apidoc sv_replace
+
+Make the first argument a copy of the second, then delete the original.
+
+=cut
+*/
void
Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv)
del_SV(nsv);
}
+/*
+=for apidoc sv_clear
+
+Clear an SV, making it empty. Does not free the memory used by the SV
+itself.
+
+=cut
+*/
+
void
Perl_sv_clear(pTHX_ register SV *sv)
{
return sv;
}
+/*
+=for apidoc sv_free
+
+Free the memory used by an SV.
+
+=cut
+*/
+
void
Perl_sv_free(pTHX_ SV *sv)
{
return len;
}
+/*
+=for apidoc sv_len_utf8
+
+Returns the number of characters in the string in an SV, counting wide
+UTF8 bytes as a single character.
+
+=cut
+*/
+
STRLEN
Perl_sv_len_utf8(pTHX_ register SV *sv)
{
return cur1 < cur2 ? -1 : 1;
}
+/*
+=for apidoc sv_cmp_locale
+
+Compares the strings in two SVs in a locale-aware manner. See
+L</sv_cmp_locale>
+
+=cut
+*/
+
I32
Perl_sv_cmp_locale(pTHX_ register SV *sv1, register SV *sv2)
{
#endif /* USE_LOCALE_COLLATE */
+/*
+=for apidoc sv_gets
+
+Get a line from the filehandle and store it into the SV, optionally
+appending to the currently-stored string.
+
+=cut
+*/
+
char *
Perl_sv_gets(pTHX_ register SV *sv, register PerlIO *fp, I32 append)
{
}
}
+/*
+=for apidoc sv_true
+
+Returns true if the SV has a true value by Perl's rules.
+
+=cut
+*/
+
I32
Perl_sv_true(pTHX_ register SV *sv)
{
return sv_2pv(sv, lp);
}
+/*
+=for apidoc sv_pvn_force
+
+Get a sensible string out of the SV somehow.
+
+=cut
+*/
+
char *
Perl_sv_pvn_force(pTHX_ SV *sv, STRLEN *lp)
{
return sv_pvn(sv,lp);
}
+/*
+=for apidoc sv_pvutf8n_force
+
+Get a sensible UTF8-encoded string out of the SV somehow. See
+L</sv_pvn_force>.
+
+=cut
+*/
+
char *
Perl_sv_pvutf8n_force(pTHX_ SV *sv, STRLEN *lp)
{
return sv_pvn_force(sv,lp);
}
+/*
+=for apidoc sv_reftype
+
+Returns a string describing what the SV is a reference to.
+
+=cut
+*/
+
char *
Perl_sv_reftype(pTHX_ SV *sv, int ob)
{