Currently, the subroutine can be identified statically if the RV that the "rv2cv" is to operate on is provided by a suitable "gv" or "const" op. A "gv" op is suitable if the GV's CV slot is populated. A "const" op is suitable if the constant value must be an RV pointing to a CV. Details of this process may change in future versions of Perl. If the "rv2cv" op has the "OPpENTERSUB_AMPER" flag set then no attempt is made to identify the subroutine statically: this flag is used to suppress compile-time magic on a subroutine call, forcing it to use default runtime behaviour.
If "flags" has the bit "RV2CVOPCV_MARK_EARLY" set, then the handling of a GV reference is modified. If a GV was examined and its CV slot was found to be empty, then the "gv" op has the "OPpEARLY_CV" flag set. If the op is not optimised away, and the CV slot is later populated with a subroutine having a prototype, that flag eventually triggers the warning "called too early to check prototype".
If "flags" has the bit "RV2CVOPCV_RETURN_NAME_GV" set, then instead of returning a pointer to the subroutine it returns a pointer to the GV giving the most appropriate name for the subroutine in this context. Normally this is just the "CvGV" of the subroutine, but for an anonymous ("CvANON") subroutine that is referenced through a GV it will be the referencing GV. The resulting "GV*" is cast to "CV*" to be returned. A null pointer is returned as usual if there is no statically-determinable subroutine.
CV * rv2cv_op_cv(OP *cvop, U32 flags)
void packlist(SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist)
Using the template "pat..patend", this function unpacks the string "s..strend" into a number of mortal SVs, which it pushes onto the perl argument (@_) stack (so you will need to issue a "PUTBACK" before and "SPAGAIN" after the call to this function). It returns the number of pushed elements.
The "strend" and "patend" pointers should point to the byte following the last character of each string.
Although this function returns its values on the perl argument stack, it doesn't take any parameters from that stack (and thus in particular there's no need to do a "PUSHMARK" before calling it, unlike "call_pv" for example).
SSize_t unpackstring(const char *pat, const char *patend, const char *s, const char *strend, U32 flags)
CV's can have CvPADLIST(cv) set to point to a PADLIST. This is the CV's scratchpad, which stores lexical variables and opcode temporary and per-thread values.
For these purposes "formats" are a kind-of CV; eval""s are too (except they're not callable at will and are always thrown away after the eval"" is done executing). Require'd files are simply evals without any outer lexical scope.
XSUBs do not have a "CvPADLIST". "dXSTARG" fetches values from "PL_curpad", but that is really the callers pad (a slot of which is allocated by every entersub). Do not get or set "CvPADLIST" if a CV is an XSUB (as determined by "CvISXSUB()"), "CvPADLIST" slot is reused for a different internal purpose in XSUBs.
The PADLIST has a C array where pads are stored.
The 0th entry of the PADLIST is a PADNAMELIST which represents the "names" or rather the "static type information" for lexicals. The individual elements of a PADNAMELIST are PADNAMEs. Future refactorings might stop the PADNAMELIST from being stored in the PADLIST's array, so don't rely on it. See "PadlistNAMES".
The CvDEPTH'th entry of a PADLIST is a PAD (an AV) which is the stack frame at that depth of recursion into the CV. The 0th slot of a frame AV is an AV which is @_. Other entries are storage for variables and op targets.
Iterating over the PADNAMELIST iterates over all possible pad items. Pad slots for targets ("SVs_PADTMP") and GVs end up having &PL_padname_undef "names", while slots for constants have &PL_padname_const "names" (see "pad_alloc"). That &PL_padname_undef and &PL_padname_const are used is an implementation detail subject to change. To test for them, use "!PadnamePV(name)" and "PadnamePV(name) && !PadnameLEN(name)", respectively.
Only "my"/"our" variable slots get valid names. The rest are op targets/GVs/constants which are statically allocated or resolved at compile time. These don't have names by which they can be looked up from Perl code at run time through eval"" the way "my"/"our" variables can be. Since they can't be looked up by "name" but only by their index allocated at compile time (which is usually in "PL_op->op_targ"), wasting a name SV for them doesn't make sense.
The pad names in the PADNAMELIST have their PV holding the name of the variable. The "COP_SEQ_RANGE_LOW" and "_HIGH" fields form a range (low+1..high inclusive) of cop_seq numbers for which the name is valid. During compilation, these fields may hold the special value PERL_PADSEQ_INTRO to indicate various stages:
COP_SEQ_RANGE_LOW _HIGH ----------------- ----- PERL_PADSEQ_INTRO 0 variable not yet introduced: { my ($x valid-seq# PERL_PADSEQ_INTRO variable in scope: { my ($x); valid-seq# valid-seq# compilation of scope complete: { my ($x); .... }
When a lexical var hasn't yet been introduced, it already exists from the perspective of duplicate declarations, but not for variable lookups, e.g.
my ($x, $x); # '"my" variable $x masks earlier declaration' my $x = $x; # equal to my $x = $::x;
For typed lexicals "PadnameTYPE" points at the type stash. For "our" lexicals, "PadnameOURSTASH" points at the stash of the associated global (so that duplicate "our" declarations in the same package can be detected). "PadnameGEN" is sometimes used to store the generation number during compilation.
If "PadnameOUTER" is set on the pad name, then that slot in the frame AV is a REFCNT'ed reference to a lexical from "outside". Such entries are sometimes referred to as 'fake'. In this case, the name does not use 'low' and 'high' to store a cop_seq range, since it is in scope throughout. Instead 'high' stores some flags containing info about the real lexical (is it declared in an anon, and is it capable of being instantiated multiple times?), and for fake ANONs, 'low' contains the index within the parent's pad where the lexical's value is stored, to make cloning quicker.
If the 'name' is "&" the corresponding entry in the PAD is a CV representing a possible closure.
Note that formats are treated as anon subs, and are cloned each time write is called (if necessary).
The flag "SVs_PADSTALE" is cleared on lexicals each time the "my()" is executed, and set on scope exit. This allows the "Variable $x is not available" warning to be generated in evals, such as
{ my $x = 1; sub f { eval '$x'} } f();
For state vars, "SVs_PADSTALE" is overloaded to mean 'not yet initialised', but this internal state is stored in a separate pad entry.
PADLIST * CvPADLIST(CV *cv)
PADOFFSET pad_add_name_pvs("literal string" name, U32 flags, HV *typestash, HV *ourstash)
The C array of pad entries.
SV ** PadARRAY(PAD pad)
PADOFFSET pad_findmy_pvs("literal string" name, U32 flags)
The C array of a padlist, containing the pads. Only subscript it with numbers >= 1, as the 0th entry is not guaranteed to remain usable.
PAD ** PadlistARRAY(PADLIST padlist)
The index of the last allocated space in the padlist. Note that the last pad may be in an earlier slot. Any entries following it will be "NULL" in that case.
SSize_t PadlistMAX(PADLIST padlist)
The names associated with pad entries.
PADNAMELIST * PadlistNAMES(PADLIST padlist)
The C array of pad names.
PADNAME ** PadlistNAMESARRAY(PADLIST padlist)
The index of the last pad name.
SSize_t PadlistNAMESMAX(PADLIST padlist)
The reference count of the padlist. Currently this is always 1.
U32 PadlistREFCNT(PADLIST padlist)
The index of the last pad entry.
SSize_t PadMAX(PAD pad)
The length of the name.
STRLEN PadnameLEN(PADNAME pn)
The C array of pad names.
PADNAME ** PadnamelistARRAY(PADNAMELIST pnl)
The index of the last pad name.
SSize_t PadnamelistMAX(PADNAMELIST pnl)
The reference count of the pad name list.
SSize_t PadnamelistREFCNT(PADNAMELIST pnl)
Lowers the reference count of the pad name list.
void PadnamelistREFCNT_dec(PADNAMELIST pnl)
The name stored in the pad name struct. This returns "NULL" for a target slot.
char * PadnamePV(PADNAME pn)
The reference count of the pad name.
SSize_t PadnameREFCNT(PADNAME pn)
Lowers the reference count of the pad name.
void PadnameREFCNT_dec(PADNAME pn)
Returns the pad name as a mortal SV.
SV * PadnameSV(PADNAME pn)
Whether PadnamePV is in UTF-8. Currently, this is always true.
bool PadnameUTF8(PADNAME pn)
padnew_CLONE this pad is for a cloned CV padnew_SAVE save old globals on the save stack padnew_SAVESUB also save extra stuff for start of sub PADLIST * pad_new(int flags)
During compilation, this points to the array containing the values part of the pad for the currently-compiling code. (At runtime a CV may have many such value arrays; at compile time just one is constructed.) At runtime, this points to the array containing the currently-relevant values for the pad for the currently-executing code.
During compilation, this points to the array containing the names part of the pad for the currently-compiling code.
Points directly to the body of the "PL_comppad" array. (I.e., this is "PadARRAY(PL_comppad)".)
HV* PL_modglobal
STRLEN PL_na
When you replace this variable, it is considered a good practice to store the possibly previously installed hook and that you recall it inside your own.
Perl_ophook_t PL_opfreehook
The peephole optimiser should never be completely replaced. Rather, add code to it by wrapping the existing optimiser. The basic way to do this can be seen in "Compile pass 3: peephole optimization" in perlguts. If the new code wishes to operate on ops throughout the subroutine's structure, rather than just at the top level, it is likely to be more convenient to wrap the "PL_rpeepp" hook.
peep_t PL_peepp
The peephole optimiser should never be completely replaced. Rather, add code to it by wrapping the existing optimiser. The basic way to do this can be seen in "Compile pass 3: peephole optimization" in perlguts. If the new code wishes to operate only on ops at a subroutine's top level, rather than throughout the structure, it is likely to be more convenient to wrap the "PL_peepp" hook.
peep_t PL_rpeepp
SV PL_sv_no
SV PL_sv_undef
SV PL_sv_yes
SV PL_sv_zero
if (SvMAGICAL(sv)) mg_get(sv); if (SvROK(sv)) sv = MUTABLE_SV(SvRV(sv)); if (SvTYPE(sv) == SVt_REGEXP) return (REGEXP*) sv;
"NULL" will be returned if a REGEXP* is not found.
REGEXP * SvRX(SV *sv)
If you want to do something with the REGEXP* later use SvRX instead and check for NULL.
bool SvRXOK(SV* sv)
dMARK;
dORIGMARK;
dSP;
void EXTEND(SP, SSize_t nitems)
void mPUSHi(IV iv)
void mPUSHn(NV nv)
void mPUSHp(char* str, STRLEN len)
void mPUSHs(SV* sv)
void mPUSHu(UV uv)
void mXPUSHi(IV iv)
void mXPUSHn(NV nv)
void mXPUSHp(char* str, STRLEN len)
void mXPUSHs(SV* sv)
void mXPUSHu(UV uv)
IV POPi
long POPl
NV POPn
char* POPp
char* POPpbytex
char* POPpx
SV* POPs
UV POPu
long POPul
void PUSHi(IV iv)
void PUSHMARK(SP)
void PUSHmortal()
void PUSHn(NV nv)
void PUSHp(char* str, STRLEN len)
void PUSHs(SV* sv)
void PUSHu(UV uv)
PUTBACK;
SPAGAIN;
void XPUSHi(IV iv)
void XPUSHmortal()
void XPUSHn(NV nv)
void XPUSHp(char* str, STRLEN len)
void XPUSHs(SV* sv)
void XPUSHu(UV uv)
void XSRETURN(int nitems)
XSRETURN_EMPTY;
void XSRETURN_IV(IV iv)
XSRETURN_NO;
void XSRETURN_NV(NV nv)
void XSRETURN_PV(char* str)
XSRETURN_UNDEF;
void XSRETURN_UV(IV uv)
XSRETURN_YES;
void XST_mIV(int pos, IV iv)
void XST_mNO(int pos)
void XST_mNV(int pos, NV nv)
void XST_mPV(int pos, char* str)
void XST_mUNDEF(int pos)
void XST_mYES(int pos)
The types are:
SVt_NULL SVt_IV SVt_NV SVt_RV SVt_PV SVt_PVIV SVt_PVNV SVt_PVMG SVt_INVLIST SVt_REGEXP SVt_PVGV SVt_PVLV SVt_PVAV SVt_PVHV SVt_PVCV SVt_PVFM SVt_PVIO
These are most easily explained from the bottom up.
"SVt_PVIO" is for I/O objects, "SVt_PVFM" for formats, "SVt_PVCV" for subroutines, "SVt_PVHV" for hashes and "SVt_PVAV" for arrays.
All the others are scalar types, that is, things that can be bound to a "$" variable. For these, the internal types are mostly orthogonal to types in the Perl language.
Hence, checking "SvTYPE(sv) < SVt_PVAV" is the best way to see whether something is a scalar.
"SVt_PVGV" represents a typeglob. If "!SvFAKE(sv)", then it is a real, incoercible typeglob. If "SvFAKE(sv)", then it is a scalar to which a typeglob has been assigned. Assigning to it again will stop it from being a typeglob. "SVt_PVLV" represents a scalar that delegates to another scalar behind the scenes. It is used, e.g., for the return value of "substr" and for tied hash and array elements. It can hold any scalar value, including a typeglob. "SVt_REGEXP" is for regular expressions. "SVt_INVLIST" is for Perl core internal use only.
"SVt_PVMG" represents a "normal" scalar (not a typeglob, regular expression, or delegate). Since most scalars do not need all the internal fields of a PVMG, we save memory by allocating smaller structs when possible. All the other types are just simpler forms of "SVt_PVMG", with fewer internal fields. "SVt_NULL" can only hold undef. "SVt_IV" can hold undef, an integer, or a reference. ("SVt_RV" is an alias for "SVt_IV", which exists for backward compatibility.) "SVt_NV" can hold any of those or a double. "SVt_PV" can only hold "undef" or a string. "SVt_PVIV" is a superset of "SVt_PV" and "SVt_IV". "SVt_PVNV" is similar. "SVt_PVMG" can hold anything "SVt_PVNV" can hold, but it can, but does not have to, be blessed or magical.
See also "PL_sv_yes" and "PL_sv_no".
SV * boolSV(bool b)
croak_xs_usage(cv, "eee_yow");
works out the package name and subroutine name from "cv", and then calls "croak()". Hence if "cv" is &ouch::awk, it would call "croak" as:
Perl_croak(aTHX_ "Usage: %" SVf "::%" SVf "(%s)", "ouch" "awk", "eee_yow"); void croak_xs_usage(const CV *const cv, const char *const params)
NOTE: the perl_ form of this function is deprecated.
SV* get_sv(const char *name, I32 flags)
I32 looks_like_number(SV *const sv)
SV* newRV_inc(SV* sv)
SV* newRV_noinc(SV *const tmpRef)
In 5.9.3, "newSV()" replaces the older "NEWSV()" API, and drops the first parameter, x, a debug aid which allowed callers to identify themselves. This aid has been superseded by a new build option, "PERL_MEM_LOG" (see "PERL_MEM_LOG" in perlhacktips). The older API is still there for use in XS modules supporting older perls.
SV* newSV(const STRLEN len)
SV* newSVhek(const HEK *const hek)
SV* newSViv(const IV i)
SV* newSVnv(const NV n)
Creates a new SV containing the pad name.
SV* newSVpadname(PADNAME *pn)
This function can cause reliability issues if you are likely to pass in empty strings that are not null terminated, because it will run strlen on the string and potentially run past valid memory.
Using "newSVpvn" is a safer alternative for non "NUL" terminated strings. For string literals use "newSVpvs" instead. This function will work fine for "NUL" terminated strings, but if you want to avoid the if statement on whether to call "strlen" use "newSVpvn" instead (calling "strlen" yourself).
SV* newSVpv(const char *const s, const STRLEN len)
SV* newSVpvf(const char *const pat, ...)
SV* newSVpvn(const char *const buffer, const STRLEN len)
#define newSVpvn_utf8(s, len, u) \ newSVpvn_flags((s), (len), (u) ? SVf_UTF8 : 0) SV* newSVpvn_flags(const char *const s, const STRLEN len, const U32 flags)
SV* newSVpvn_share(const char* s, I32 len, U32 hash)
SV* newSVpvn_utf8(const char* s, STRLEN len, U32 utf8)
SV* newSVpvs("literal string" s)
SV* newSVpvs_flags("literal string" s, U32 flags)
SV* newSVpv_share(const char* s, U32 hash)
SV* newSVpvs_share("literal string" s)
SV* newSVrv(SV *const rv, const char *const classname)
SV* newSVsv(SV *const old)
SV* newSVsv_nomg(SV *const old)
SV* newSV_type(const svtype type)
SV* newSVuv(const UV u)
bool sv_2bool(SV *const sv)
bool sv_2bool_flags(SV *sv, I32 flags)
CV* sv_2cv(SV* sv, HV **const st, GV **const gvp, const I32 lref)
'Get' magic is ignored on the "sv" passed in, but will be called on "SvRV(sv)" if "sv" is an RV.
IO* sv_2io(SV *const sv)
IV sv_2iv_flags(SV *const sv, const I32 flags)
SV* sv_2mortal(SV *const sv)
NV sv_2nv_flags(SV *const sv, const I32 flags)
Usually accessed via the "SvPVbyte" macro.
char* sv_2pvbyte(SV *sv, STRLEN *const lp)
Usually accessed via the "SvPVutf8" macro.
char* sv_2pvutf8(SV *sv, STRLEN *const lp)
char* sv_2pv_flags(SV *const sv, STRLEN *const lp, const I32 flags)
UV sv_2uv_flags(SV *const sv, const I32 flags)
void sv_backoff(SV *const sv)
SV* sv_bless(SV *const sv, HV *const stash)
void sv_catpv(SV *const sv, const char* ptr)
void sv_catpvf(SV *const sv, const char *const pat, ...)
void sv_catpvf_mg(SV *const sv, const char *const pat, ...)
void sv_catpvn(SV *dsv, const char *sstr, STRLEN len)
By default, the string appended is assumed to be valid UTF-8 if the SV has the UTF-8 status set, and a string of bytes otherwise. One can force the appended string to be interpreted as UTF-8 by supplying the "SV_CATUTF8" flag, and as bytes by supplying the "SV_CATBYTES" flag; the SV or the string appended will be upgraded to UTF-8 if necessary.
If "flags" has the "SV_SMAGIC" bit set, will "mg_set" on "dsv" afterwards if appropriate. "sv_catpvn" and "sv_catpvn_nomg" are implemented in terms of this function.
void sv_catpvn_flags(SV *const dstr, const char *sstr, const STRLEN len, const I32 flags)
void sv_catpvn_nomg(SV* sv, const char* ptr, STRLEN len)
void sv_catpvs(SV* sv, "literal string" s)
void sv_catpvs_flags(SV* sv, "literal string" s, I32 flags)
void sv_catpvs_mg(SV* sv, "literal string" s)
void sv_catpvs_nomg(SV* sv, "literal string" s)
void sv_catpv_flags(SV *dstr, const char *sstr, const I32 flags)
void sv_catpv_mg(SV *const sv, const char *const ptr)
void sv_catpv_nomg(SV* sv, const char* ptr)
void sv_catsv(SV *dstr, SV *sstr)
void sv_catsv_flags(SV *const dsv, SV *const ssv, const I32 flags)
void sv_catsv_nomg(SV* dsv, SV* ssv)
Beware: after this function returns, "ptr" and SvPVX_const(sv) may no longer refer to the same chunk of data.
The unfortunate similarity of this function's name to that of Perl's "chop" operator is strictly coincidental. This function works from the left; "chop" works from the right.
void sv_chop(SV *const sv, const char *const ptr)
void sv_clear(SV *const orig_sv)
I32 sv_cmp(SV *const sv1, SV *const sv2)
I32 sv_cmp_flags(SV *const sv1, SV *const sv2, const U32 flags)
I32 sv_cmp_locale(SV *const sv1, SV *const sv2)
I32 sv_cmp_locale_flags(SV *const sv1, SV *const sv2, const U32 flags)
char* sv_collxfrm(SV *const sv, STRLEN *const nxp)
Any scalar variable may carry "PERL_MAGIC_collxfrm" magic that contains the scalar data of the variable, but transformed to such a format that a normal memory comparison can be used to compare the data according to the locale settings.
char* sv_collxfrm_flags(SV *const sv, STRLEN *const nxp, I32 const flags)
void sv_copypv(SV *const dsv, SV *const ssv)
void sv_copypv_flags(SV *const dsv, SV *const ssv, const I32 flags)
void sv_copypv_nomg(SV *const dsv, SV *const ssv)
STRLEN SvCUR(SV* sv)
void SvCUR_set(SV* sv, STRLEN len)
void sv_dec(SV *const sv)
void sv_dec_nomg(SV *const sv)
bool sv_derived_from(SV* sv, const char *const name)
bool sv_derived_from_pv(SV* sv, const char *const name, U32 flags)
Currently, the only significant value for "flags" is SVf_UTF8.
bool sv_derived_from_pvn(SV* sv, const char *const name, const STRLEN len, U32 flags)
bool sv_derived_from_sv(SV* sv, SV *namesv, U32 flags)
bool sv_does(SV* sv, const char *const name)
bool sv_does_pv(SV* sv, const char *const name, U32 flags)
bool sv_does_pvn(SV* sv, const char *const name, const STRLEN len, U32 flags)
bool sv_does_sv(SV* sv, SV* namesv, U32 flags)
Warning: If "SvCUR" is equal to "SvLEN", then "SvEND" points to unallocated memory.
char* SvEND(SV* sv)
I32 sv_eq(SV* sv1, SV* sv2)
I32 sv_eq_flags(SV* sv1, SV* sv2, const U32 flags)
This function is expected to be used to signal to perl that this SV is about to be written to, and any extra book-keeping needs to be taken care of. Hence, it croaks on read-only values.
void sv_force_normal_flags(SV *const sv, const U32 flags)
void sv_free(SV *const sv)
U32 SvGAMAGIC(SV* sv)
char* sv_gets(SV *const sv, PerlIO *const fp, I32 append)
If "sv" is the target of a weak reference then it returns the back references structure associated with the sv; otherwise return "NULL".
When returning a non-null result the type of the return is relevant. If it is an AV then the elements of the AV are the weak reference RVs which point at this item. If it is any other type then the item itself is the weak reference.
See also "Perl_sv_add_backref()", "Perl_sv_del_backref()", "Perl_sv_kill_backrefs()"
SV* sv_get_backrefs(SV *const sv)
You might mistakenly think that "len" is the number of bytes to add to the existing size, but instead it is the total size "sv" should be.
char * SvGROW(SV* sv, STRLEN len)
char* sv_grow(SV *const sv, STRLEN newlen)
void sv_inc(SV *const sv)
void sv_inc_nomg(SV *const sv)
void sv_insert(SV *const bigstr, const STRLEN offset, const STRLEN len, const char *const little, const STRLEN littlelen)
void sv_insert_flags(SV *const bigstr, const STRLEN offset, const STRLEN len, const char *little, const STRLEN littlelen, const U32 flags)
U32 SvIOK(SV* sv)
bool SvIOK_notUV(SV* sv)
void SvIOK_off(SV* sv)
void SvIOK_on(SV* sv)
void SvIOK_only(SV* sv)
void SvIOK_only_UV(SV* sv)
U32 SvIOKp(SV* sv)
bool SvIOK_UV(SV* sv)
int sv_isa(SV* sv, const char *const name)
U32 SvIsCOW(SV* sv)
bool SvIsCOW_shared_hash(SV* sv)
int sv_isobject(SV* sv)
See "SvIVx" for a version which guarantees to evaluate "sv" only once.
IV SvIV(SV* sv)
IV SvIV_nomg(SV* sv)
void SvIV_set(SV* sv, IV val)
IV SvIVX(SV* sv)
This form guarantees to evaluate "sv" only once. Only use this if "sv" is an expression with side effects, otherwise use the more efficient "SvIV".
IV SvIVx(SV* sv)
STRLEN SvLEN(SV* sv)
STRLEN sv_len(SV *const sv)
void SvLEN_set(SV* sv, STRLEN len)
STRLEN sv_len_utf8(SV *const sv)
See "sv_magicext" (which "sv_magic" now calls) for a description of the handling of the "name" and "namlen" arguments.
You need to use "sv_magicext" to add magic to "SvREADONLY" SVs and also to add more than one instance of the same "how".
void sv_magic(SV *const sv, SV *const obj, const int how, const char *const name, const I32 namlen)
Note that "sv_magicext" will allow things that "sv_magic" will not. In particular, you can add magic to "SvREADONLY" SVs, and add more than one instance of the same "how".
If "namlen" is greater than zero then a "savepvn" copy of "name" is stored, if "namlen" is zero then "name" is stored as-is and - as another special case - if "(name && namlen == HEf_SVKEY)" then "name" is assumed to contain an SV* and is stored as-is with its "REFCNT" incremented.
(This is now used as a subroutine by "sv_magic".)
MAGIC * sv_magicext(SV *const sv, SV *const obj, const int how, const MGVTBL *const vtbl, const char *const name, const I32 namlen)
void SvMAGIC_set(SV* sv, MAGIC* val)
SV* sv_mortalcopy(SV *const oldsv)
SV* sv_newmortal()
SV* sv_newref(SV *const sv)
U32 SvNIOK(SV* sv)
void SvNIOK_off(SV* sv)
U32 SvNIOKp(SV* sv)
U32 SvNOK(SV* sv)
void SvNOK_off(SV* sv)
void SvNOK_on(SV* sv)
void SvNOK_only(SV* sv)
U32 SvNOKp(SV* sv)
See "SvNVx" for a version which guarantees to evaluate "sv" only once.
NV SvNV(SV* sv)
NV SvNV_nomg(SV* sv)
void SvNV_set(SV* sv, NV val)
NV SvNVX(SV* sv)
This form guarantees to evaluate "sv" only once. Only use this if "sv" is an expression with side effects, otherwise use the more efficient "SvNV".
NV SvNVx(SV* sv)
U32 SvOK(SV* sv)
U32 SvOOK(SV* sv)
void SvOOK_offset(SV*sv, STRLEN len)
U32 SvPOK(SV* sv)
void SvPOK_off(SV* sv)
void SvPOK_on(SV* sv)
void SvPOK_only(SV* sv)
void SvPOK_only_UTF8(SV* sv)
U32 SvPOKp(SV* sv)
Use "sv_pos_b2u_flags" in preference, which correctly handles strings longer than 2Gb.
void sv_pos_b2u(SV *const sv, I32 *const offsetp)
STRLEN sv_pos_b2u_flags(SV *const sv, STRLEN const offset, U32 flags)
Use "sv_pos_u2b_flags" in preference, which correctly handles strings longer than 2Gb.
void sv_pos_u2b(SV *const sv, I32 *const offsetp, I32 *const lenp)
STRLEN sv_pos_u2b_flags(SV *const sv, STRLEN uoffset, STRLEN *const lenp, U32 flags)
Note that there is no guarantee that the return value of "SvPV()" is equal to "SvPVX(sv)", or that "SvPVX(sv)" contains valid data, or that successive calls to "SvPV(sv)" will return the same pointer value each time. This is due to the way that things like overloading and Copy-On-Write are handled. In these cases, the return value may point to a temporary buffer or similar. If you absolutely need the "SvPVX" field to be valid (for example, if you intend to write to it), then see "SvPV_force".
char* SvPV(SV* sv, STRLEN len)
char* SvPVbyte(SV* sv, STRLEN len)
char* SvPVbyte_force(SV* sv, STRLEN len)
char* SvPVbyte_nolen(SV* sv)
char* sv_pvbyten_force(SV *const sv, STRLEN *const lp)
char* SvPVbytex(SV* sv, STRLEN len)
char* SvPVbytex_force(SV* sv, STRLEN len)
char * SvPVCLEAR(SV* sv)
Note that coercing an arbitrary scalar into a plain PV will potentially strip useful data from it. For example if the SV was "SvROK", then the referent will have its reference count decremented, and the SV itself may be converted to an "SvPOK" scalar with a string buffer containing a value such as "ARRAY(0x1234)".
char* SvPV_force(SV* sv, STRLEN len)
char* SvPV_force_nomg(SV* sv, STRLEN len)
char* SvPV_nolen(SV* sv)
char* SvPV_nomg(SV* sv, STRLEN len)
char* SvPV_nomg_nolen(SV* sv)
char* sv_pvn_force(SV* sv, STRLEN* lp)
char* sv_pvn_force_flags(SV *const sv, STRLEN *const lp, const I32 flags)
Set the value of the PV pointer in "sv" to the Perl allocated "NUL"-terminated string "val". See also "SvIV_set".
Remember to free the previous PV buffer. There are many things to check. Beware that the existing pointer may be involved in copy-on-write or other mischief, so do "SvOOK_off(sv)" and use "sv_force_normal" or "SvPV_force" (or check the "SvIsCOW" flag) first to make sure this modification is safe. Then finally, if it is not a COW, call "SvPV_free" to free the previous PV buffer.
void SvPV_set(SV* sv, char* val)
char* SvPVutf8(SV* sv, STRLEN len)
char* sv_pvutf8n_force(SV *const sv, STRLEN *const lp)
char* SvPVutf8x(SV* sv, STRLEN len)
char* SvPVutf8x_force(SV* sv, STRLEN len)
char* SvPVutf8_force(SV* sv, STRLEN len)
char* SvPVutf8_nolen(SV* sv)
This is also used to store the name of an autoloaded subroutine in an XS AUTOLOAD routine. See "Autoloading with XSUBs" in perlguts.
char* SvPVX(SV* sv)
char* SvPVx(SV* sv, STRLEN len)
U32 SvREADONLY(SV* sv)
U32 SvREADONLY_off(SV* sv)
U32 SvREADONLY_on(SV* sv)
dst can be a SV to be set to the description or NULL, in which case a mortal SV is returned.
If ob is true and the SV is blessed, the description is the class name, otherwise it is the type of the SV, "SCALAR", "ARRAY" etc.
SV* sv_ref(SV *dst, const SV *const sv, const int ob)
U32 SvREFCNT(SV* sv)
void SvREFCNT_dec(SV* sv)
void SvREFCNT_dec_NN(SV* sv)
All of the following "SvREFCNT_inc"* macros are optimized versions of "SvREFCNT_inc", and can be replaced with "SvREFCNT_inc".
SV* SvREFCNT_inc(SV* sv)
SV* SvREFCNT_inc_NN(SV* sv)
SV* SvREFCNT_inc_simple(SV* sv)
SV* SvREFCNT_inc_simple_NN(SV* sv)
void SvREFCNT_inc_simple_void(SV* sv)
void SvREFCNT_inc_simple_void_NN(SV* sv)
void SvREFCNT_inc_void(SV* sv)
void SvREFCNT_inc_void_NN(SV* sv)
If ob is true and the SV is blessed, the string is the class name, otherwise it is the type of the SV, "SCALAR", "ARRAY" etc.
const char* sv_reftype(const SV *const sv, const int ob)
void sv_replace(SV *const sv, SV *const nsv)
void sv_report_used()
void sv_reset(const char* s, HV *const stash)
U32 SvROK(SV* sv)
void SvROK_off(SV* sv)
void SvROK_on(SV* sv)
SV* SvRV(SV* sv)
void SvRV_set(SV* sv, SV* val)
SV* sv_rvunweaken(SV *const sv)
SV* sv_rvweaken(SV *const sv)
void sv_setiv(SV *const sv, const IV num)
void sv_setiv_mg(SV *const sv, const IV i)
void sv_setnv(SV *const sv, const NV num)
void sv_setnv_mg(SV *const sv, const NV num)
void sv_setpv(SV *const sv, const char *const ptr)
void sv_setpvf(SV *const sv, const char *const pat, ...)
void sv_setpvf_mg(SV *const sv, const char *const pat, ...)
void sv_setpviv(SV *const sv, const IV num)
void sv_setpviv_mg(SV *const sv, const IV iv)
void sv_setpvn(SV *const sv, const char *const ptr, const STRLEN len)
void sv_setpvn_mg(SV *const sv, const char *const ptr, const STRLEN len)
void sv_setpvs(SV* sv, "literal string" s)
void sv_setpvs_mg(SV* sv, "literal string" s)
char * sv_setpv_bufsize(SV *const sv, const STRLEN cur, const STRLEN len)
void sv_setpv_mg(SV *const sv, const char *const ptr)
SV* sv_setref_iv(SV *const rv, const char *const classname, const IV iv)
SV* sv_setref_nv(SV *const rv, const char *const classname, const NV nv)
Do not use with other Perl types such as HV, AV, SV, CV, because those objects will become corrupted by the pointer copy process.
Note that "sv_setref_pvn" copies the string while this copies the pointer.
SV* sv_setref_pv(SV *const rv, const char *const classname, void *const pv)
Note that "sv_setref_pv" copies the pointer while this copies the string.
SV* sv_setref_pvn(SV *const rv, const char *const classname, const char *const pv, const STRLEN n)
SV * sv_setref_pvs("literal string" s)
SV* sv_setref_uv(SV *const rv, const char *const classname, const UV uv)
You probably want to use one of the assortment of wrappers, such as "SvSetSV", "SvSetSV_nosteal", "SvSetMagicSV" and "SvSetMagicSV_nosteal".
void sv_setsv(SV *dstr, SV *sstr)
You probably want to use one of the assortment of wrappers, such as "SvSetSV", "SvSetSV_nosteal", "SvSetMagicSV" and "SvSetMagicSV_nosteal".
This is the primary function for copying scalars, and most other copy-ish functions and macros use this underneath.
void sv_setsv_flags(SV *dstr, SV *sstr, const I32 flags)
void sv_setsv_mg(SV *const dstr, SV *const sstr)
void sv_setsv_nomg(SV* dsv, SV* ssv)
void sv_setuv(SV *const sv, const UV num)
void sv_setuv_mg(SV *const sv, const UV u)
The perl equivalent is "$sv = undef;". Note that it doesn't free any string buffer, unlike "undef $sv".
Introduced in perl 5.25.12.
void sv_set_undef(SV *sv)
HV* SvSTASH(SV* sv)
void SvSTASH_set(SV* sv, HV* val)
void SvTAINT(SV* sv)
bool SvTAINTED(SV* sv)
bool sv_tainted(SV *const sv)
void SvTAINTED_off(SV* sv)
void SvTAINTED_on(SV* sv)
bool SvTRUE(SV* sv)
I32 sv_true(SV *const sv)
bool SvTRUE_nomg(SV* sv)
svtype SvTYPE(SV* sv)
int sv_unmagic(SV *const sv, const int type)
int sv_unmagicext(SV *const sv, const int type, MGVTBL *vtbl)
void sv_unref_flags(SV *const ref, const U32 flags)
void sv_untaint(SV *const sv)
bool SvUOK(SV* sv)
void SvUPGRADE(SV* sv, svtype type)
void sv_upgrade(SV *const sv, svtype new_type)
If "flags & SV_SMAGIC" is true, will call "SvSETMAGIC". If "flags & SV_HAS_TRAILING_NUL" is true, then "ptr[len]" must be "NUL", and the realloc will be skipped (i.e. the buffer is actually at least 1 byte longer than "len", and already meets the requirements for storing in "SvPVX").
void sv_usepvn_flags(SV *const sv, char* ptr, const STRLEN len, const U32 flags)
If you want to take into account the bytes pragma, use "DO_UTF8" instead.
U32 SvUTF8(SV* sv)
bool sv_utf8_decode(SV *const sv)
This is not a general purpose Unicode to byte encoding interface: use the "Encode" extension for that.
bool sv_utf8_downgrade(SV *const sv, const bool fail_ok)
void sv_utf8_encode(SV *const sv)
This is not a general purpose byte encoding to Unicode interface: use the Encode extension for that.
STRLEN sv_utf8_upgrade(SV *sv)
The "SV_FORCE_UTF8_UPGRADE" flag is now ignored.
Returns the number of bytes in the converted string.
This is not a general purpose byte encoding to Unicode interface: use the Encode extension for that.
STRLEN sv_utf8_upgrade_flags(SV *const sv, const I32 flags)
"sv_utf8_upgrade", "sv_utf8_upgrade_nomg", and "sv_utf8_upgrade_flags" are implemented in terms of this function.
Returns the number of bytes in the converted string (not including the spares).
STRLEN sv_utf8_upgrade_flags_grow(SV *const sv, const I32 flags, STRLEN extra)
STRLEN sv_utf8_upgrade_nomg(SV *sv)
void SvUTF8_off(SV *sv)
void SvUTF8_on(SV *sv)
See "SvUVx" for a version which guarantees to evaluate "sv" only once.
UV SvUV(SV* sv)
UV SvUV_nomg(SV* sv)
void SvUV_set(SV* sv, UV val)
UV SvUVX(SV* sv)
This form guarantees to evaluate "sv" only once. Only use this if "sv" is an expression with side effects, otherwise use the more efficient "SvUV".
UV SvUVx(SV* sv)
Usually used via its frontend "sv_catpvf".
void sv_vcatpvf(SV *const sv, const char *const pat, va_list *const args)
void sv_vcatpvfn(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const Size_t sv_count, bool *const maybe_tainted)
When running with taint checks enabled, indicates via "maybe_tainted" if results are untrustworthy (often due to the use of locales).
If called as "sv_vcatpvfn" or flags has the "SV_GMAGIC" bit set, calls get magic.
It assumes that pat has the same utf8-ness as sv. It's the caller's responsibility to ensure that this is so.
Usually used via one of its frontends "sv_vcatpvf" and "sv_vcatpvf_mg".
void sv_vcatpvfn_flags(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const Size_t sv_count, bool *const maybe_tainted, const U32 flags)
Usually used via its frontend "sv_catpvf_mg".
void sv_vcatpvf_mg(SV *const sv, const char *const pat, va_list *const args)
bool SvVOK(SV* sv)
Usually used via its frontend "sv_setpvf".
void sv_vsetpvf(SV *const sv, const char *const pat, va_list *const args)
Usually used via one of its frontends "sv_vsetpvf" and "sv_vsetpvf_mg".
void sv_vsetpvfn(SV *const sv, const char *const pat, const STRLEN patlen, va_list *const args, SV **const svargs, const Size_t sv_count, bool *const maybe_tainted)
Usually used via its frontend "sv_setpvf_mg".
void sv_vsetpvf_mg(SV *const sv, const char *const pat, va_list *const args)
See also "Character classification", and "Character case changing". Various functions outside this section also work specially with Unicode. Search for the string "utf8" in this document.
-1 or +1 is returned if the shorter string was identical to the start of the longer string. -2 or +2 is returned if there was a difference between characters within the strings.
int bytes_cmp_utf8(const U8 *b, STRLEN blen, const U8 *u, STRLEN ulen)
Converts a potentially UTF-8 encoded string "s" of length *lenp into native byte encoding. On input, the boolean *is_utf8p gives whether or not "s" is actually encoded in UTF-8.
Unlike "utf8_to_bytes" but like "bytes_to_utf8", this is non-destructive of the input string.
Do nothing if *is_utf8p is 0, or if there are code points in the string not expressible in native byte encoding. In these cases, *is_utf8p and *lenp are unchanged, and the return value is the original "s".
Otherwise, *is_utf8p is set to 0, and the return value is a pointer to a newly created string containing a downgraded copy of "s", and whose length is returned in *lenp, updated. The new string is "NUL"-terminated. The caller is responsible for arranging for the memory used by this string to get freed.
Upon successful return, the number of variants in the string can be computed by having saved the value of *lenp before the call, and subtracting the after-call value of *lenp from it.
U8* bytes_from_utf8(const U8 *s, STRLEN *lenp, bool *is_utf8p)
Converts a string "s" of length *lenp bytes from the native encoding into UTF-8. Returns a pointer to the newly-created string, and sets *lenp to reflect the new length in bytes. The caller is responsible for arranging for the memory used by this string to get freed.
Upon successful return, the number of variants in the string can be computed by having saved the value of *lenp before the call, and subtracting it from the after-call value of *lenp.
A "NUL" character will be written after the end of the string.
If you want to convert to UTF-8 from encodings other than the native (Latin1 or EBCDIC), see "sv_recode_to_utf8"().
U8* bytes_to_utf8(const U8 *s, STRLEN *lenp)
You should use this after a call to "SvPV()" or one of its variants, in case any call to string overloading updates the internal UTF-8 encoding flag.
bool DO_UTF8(SV* sv)
If "u1" is true, the string "s1" is assumed to be in UTF-8-encoded Unicode; otherwise it is assumed to be in native 8-bit encoding. Correspondingly for "u2" with respect to "s2".
If the byte length "l1" is non-zero, it says how far into "s1" to check for fold equality. In other words, "s1"+"l1" will be used as a goal to reach. The scan will not be considered to be a match unless the goal is reached, and scanning won't continue past that goal. Correspondingly for "l2" with respect to "s2".
If "pe1" is non-"NULL" and the pointer it points to is not "NULL", that pointer is considered an end pointer to the position 1 byte past the maximum point in "s1" beyond which scanning will not continue under any circumstances. (This routine assumes that UTF-8 encoded input strings are not malformed; malformed input can cause it to read past "pe1"). This means that if both "l1" and "pe1" are specified, and "pe1" is less than "s1"+"l1", the match will never be successful because it can never get as far as its goal (and in fact is asserted against). Correspondingly for "pe2" with respect to "s2".
At least one of "s1" and "s2" must have a goal (at least one of "l1" and "l2" must be non-zero), and if both do, both have to be reached for a successful match. Also, if the fold of a character is multiple characters, all of them must be matched (see tr21 reference below for 'folding').
Upon a successful match, if "pe1" is non-"NULL", it will be set to point to the beginning of the next character of "s1" beyond what was matched. Correspondingly for "pe2" and "s2".
For case-insensitiveness, the "casefolding" of Unicode is used instead of upper/lowercasing both the characters, see <http://www.unicode.org/unicode/reports/tr21/> (Case Mappings).
I32 foldEQ_utf8(const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2)
bool is_ascii_string(const U8* const s, STRLEN len)
This function returns FALSE for strings containing any code points above the Unicode max of 0x10FFFF or surrogate code points, but accepts non-character code points per Corrigendum #9 <http://www.unicode.org/versions/corrigendum9.html>.
See also "is_utf8_invariant_string", "is_utf8_invariant_string_loc", "is_utf8_string", "is_utf8_string_flags", "is_utf8_string_loc", "is_utf8_string_loc_flags", "is_utf8_string_loclen", "is_utf8_string_loclen_flags", "is_utf8_fixed_width_buf_flags", "is_utf8_fixed_width_buf_loc_flags", "is_utf8_fixed_width_buf_loclen_flags", "is_strict_utf8_string", "is_strict_utf8_string_loc", "is_strict_utf8_string_loclen", "is_c9strict_utf8_string_loc", and "is_c9strict_utf8_string_loclen".
bool is_c9strict_utf8_string(const U8 *s, STRLEN len)
See also "is_c9strict_utf8_string_loclen".
bool is_c9strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep)
See also "is_c9strict_utf8_string_loc".
bool is_c9strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
The largest acceptable code point is the Unicode maximum 0x10FFFF. This differs from "isSTRICT_UTF8_CHAR" only in that it accepts non-character code points. This corresponds to Unicode Corrigendum #9 <http://www.unicode.org/versions/corrigendum9.html>. which said that non-character code points are merely discouraged rather than completely forbidden in open interchange. See "Noncharacter code points" in perlunicode.
Use "isUTF8_CHAR" to check for Perl's extended UTF-8; and "isUTF8_CHAR_flags" for a more customized definition.
Use "is_c9strict_utf8_string", "is_c9strict_utf8_string_loc", and "is_c9strict_utf8_string_loclen" to check entire strings.
STRLEN isC9_STRICT_UTF8_CHAR(const U8 *s, const U8 *e)
bool is_invariant_string(const U8* const s, STRLEN len)
The largest acceptable code point is the Unicode maximum 0x10FFFF, and must not be a surrogate nor a non-character code point. Thus this excludes any code point from Perl's extended UTF-8.
This is used to efficiently decide if the next few bytes in "s" is legal Unicode-acceptable UTF-8 for a single character.
Use "isC9_STRICT_UTF8_CHAR" to use the Unicode Corrigendum #9 <http://www.unicode.org/versions/corrigendum9.html> definition of allowable code points; "isUTF8_CHAR" to check for Perl's extended UTF-8; and "isUTF8_CHAR_flags" for a more customized definition.
Use "is_strict_utf8_string", "is_strict_utf8_string_loc", and "is_strict_utf8_string_loclen" to check entire strings.
Size_t isSTRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
This function returns FALSE for strings containing any code points above the Unicode max of 0x10FFFF, surrogate code points, or non-character code points.
See also "is_utf8_invariant_string", "is_utf8_invariant_string_loc", "is_utf8_string", "is_utf8_string_flags", "is_utf8_string_loc", "is_utf8_string_loc_flags", "is_utf8_string_loclen", "is_utf8_string_loclen_flags", "is_utf8_fixed_width_buf_flags", "is_utf8_fixed_width_buf_loc_flags", "is_utf8_fixed_width_buf_loclen_flags", "is_strict_utf8_string_loc", "is_strict_utf8_string_loclen", "is_c9strict_utf8_string", "is_c9strict_utf8_string_loc", and "is_c9strict_utf8_string_loclen".
bool is_strict_utf8_string(const U8 *s, STRLEN len)
See also "is_strict_utf8_string_loclen".
bool is_strict_utf8_string_loc(const U8 *s, STRLEN len, const U8 **ep)
See also "is_strict_utf8_string_loc".
bool is_strict_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
If "flags" is 0, any well-formed UTF-8, as extended by Perl, is accepted without restriction. If the final few bytes of the buffer do not form a complete code point, this will return TRUE anyway, provided that "is_utf8_valid_partial_char_flags" returns TRUE for them.
If "flags" in non-zero, it can be any combination of the "UTF8_DISALLOW_ foo" flags accepted by "utf8n_to_uvchr", and with the same meanings.
This function differs from "is_utf8_string_flags" only in that the latter returns FALSE if the final few bytes of the string don't form a complete code point.
bool is_utf8_fixed_width_buf_flags( const U8 * const s, STRLEN len, const U32 flags )
bool is_utf8_fixed_width_buf_loclen_flags( const U8 * const s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags )
See also "is_utf8_fixed_width_buf_loclen_flags".
bool is_utf8_fixed_width_buf_loc_flags( const U8 * const s, STRLEN len, const U8 **ep, const U32 flags )
If "len" is 0, it will be calculated using strlen(s), (which means if you use this option, that "s" can't have embedded "NUL" characters and has to have a terminating "NUL" byte).
See also "is_utf8_string", "is_utf8_string_flags", "is_utf8_string_loc", "is_utf8_string_loc_flags", "is_utf8_string_loclen", "is_utf8_string_loclen_flags", "is_utf8_fixed_width_buf_flags", "is_utf8_fixed_width_buf_loc_flags", "is_utf8_fixed_width_buf_loclen_flags", "is_strict_utf8_string", "is_strict_utf8_string_loc", "is_strict_utf8_string_loclen", "is_c9strict_utf8_string", "is_c9strict_utf8_string_loc", and "is_c9strict_utf8_string_loclen".
bool is_utf8_invariant_string(const U8* const s, STRLEN len)
bool is_utf8_invariant_string_loc(const U8* const s, STRLEN len, const U8 ** ep)
This function considers Perl's extended UTF-8 to be valid. That means that code points above Unicode, surrogates, and non-character code points are considered valid by this function. Use "is_strict_utf8_string", "is_c9strict_utf8_string", or "is_utf8_string_flags" to restrict what code points are considered valid.
See also "is_utf8_invariant_string", "is_utf8_invariant_string_loc", "is_utf8_string_loc", "is_utf8_string_loclen", "is_utf8_fixed_width_buf_flags", "is_utf8_fixed_width_buf_loc_flags", "is_utf8_fixed_width_buf_loclen_flags",
bool is_utf8_string(const U8 *s, STRLEN len)
If "flags" is 0, this gives the same results as "is_utf8_string"; if "flags" is "UTF8_DISALLOW_ILLEGAL_INTERCHANGE", this gives the same results as "is_strict_utf8_string"; and if "flags" is "UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE", this gives the same results as "is_c9strict_utf8_string". Otherwise "flags" may be any combination of the "UTF8_DISALLOW_foo" flags understood by "utf8n_to_uvchr", with the same meanings.
See also "is_utf8_invariant_string", "is_utf8_invariant_string_loc", "is_utf8_string", "is_utf8_string_loc", "is_utf8_string_loc_flags", "is_utf8_string_loclen", "is_utf8_string_loclen_flags", "is_utf8_fixed_width_buf_flags", "is_utf8_fixed_width_buf_loc_flags", "is_utf8_fixed_width_buf_loclen_flags", "is_strict_utf8_string", "is_strict_utf8_string_loc", "is_strict_utf8_string_loclen", "is_c9strict_utf8_string", "is_c9strict_utf8_string_loc", and "is_c9strict_utf8_string_loclen".
bool is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
See also "is_utf8_string_loclen".
bool is_utf8_string_loc(const U8 *s, const STRLEN len, const U8 **ep)
See also "is_utf8_string_loc".
bool is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
See also "is_utf8_string_loc_flags".
bool is_utf8_string_loclen_flags(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags)
See also "is_utf8_string_loclen_flags".
bool is_utf8_string_loc_flags(const U8 *s, STRLEN len, const U8 **ep, const U32 flags)
In other words this returns TRUE if "s" points to a partial UTF-8-encoded code point.
This is useful when a fixed-length buffer is being tested for being well-formed UTF-8, but the final few bytes in it don't comprise a full character; that is, it is split somewhere in the middle of the final code point's UTF-8 representation. (Presumably when the buffer is refreshed with the next chunk of data, the new first bytes will complete the partial code point.) This function is used to verify that the final bytes in the current buffer are in fact the legal beginning of some code point, so that if they aren't, the failure can be signalled without having to wait for the next read.
bool is_utf8_valid_partial_char(const U8 * const s, const U8 * const e)
If "flags" is 0, this behaves identically to "is_utf8_valid_partial_char". Otherwise "flags" can be any combination of the "UTF8_DISALLOW_foo " flags accepted by "utf8n_to_uvchr". If there is any sequence of bytes that can complete the input partial character in such a way that a non-prohibited character is formed, the function returns TRUE; otherwise FALSE. Non character code points cannot be determined based on partial character input. But many of the other possible excluded types can be determined from just the first one or two bytes.
bool is_utf8_valid_partial_char_flags( const U8 * const s, const U8 * const e, const U32 flags )
The code point can be any that will fit in an IV on this machine, using Perl's extension to official UTF-8 to represent those higher than the Unicode maximum of 0x10FFFF. That means that this macro is used to efficiently decide if the next few bytes in "s" is legal UTF-8 for a single character.
Use "isSTRICT_UTF8_CHAR" to restrict the acceptable code points to those defined by Unicode to be fully interchangeable across applications; "isC9_STRICT_UTF8_CHAR" to use the Unicode Corrigendum #9 <http://www.unicode.org/versions/corrigendum9.html> definition of allowable code points; and "isUTF8_CHAR_flags" for a more customized definition.
Use "is_utf8_string", "is_utf8_string_loc", and "is_utf8_string_loclen" to check entire strings.
Note also that a UTF-8 "invariant" character (i.e. ASCII on non-EBCDIC machines) is a valid UTF-8 character.
STRLEN isUTF8_CHAR(const U8 *s, const U8 *e)
If "flags" is 0, this gives the same results as "isUTF8_CHAR"; if "flags" is "UTF8_DISALLOW_ILLEGAL_INTERCHANGE", this gives the same results as "isSTRICT_UTF8_CHAR"; and if "flags" is "UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE", this gives the same results as "isC9_STRICT_UTF8_CHAR". Otherwise "flags" may be any combination of the "UTF8_DISALLOW_foo" flags understood by "utf8n_to_uvchr", with the same meanings.
The three alternative macros are for the most commonly needed validations; they are likely to run somewhat faster than this more general one, as they can be inlined into your code.
Use "is_utf8_string_flags", "is_utf8_string_loc_flags", and "is_utf8_string_loclen_flags" to check entire strings.
STRLEN isUTF8_CHAR_flags(const U8 *s, const U8 *e, const U32 flags)
The "flags" argument can have "UNI_DISPLAY_ISPRINT" set to display "isPRINT()"able characters as themselves, "UNI_DISPLAY_BACKSLASH" to display the "\\[nrfta\\]" as the backslashed versions (like "\n") ("UNI_DISPLAY_BACKSLASH" is preferred over "UNI_DISPLAY_ISPRINT" for "\\"). "UNI_DISPLAY_QQ" (and its alias "UNI_DISPLAY_REGEX") have both "UNI_DISPLAY_BACKSLASH" and "UNI_DISPLAY_ISPRINT" turned on.
The pointer to the PV of the "dsv" is returned.
See also "sv_uni_display".
char* pv_uni_display(SV *dsv, const U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
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)
If "sv" already is UTF-8 (or if it is not "POK"), or if "encoding" is not a reference, nothing is done to "sv". If "encoding" is not an "Encode::XS" Encoding object, bad things will happen. (See cpan/Encode/encoding.pm and Encode.)
The PV of "sv" is returned.
char* sv_recode_to_utf8(SV* sv, SV *encoding)
The "flags" argument is as in "pv_uni_display"().
The pointer to the PV of the "dsv" is returned.
char* sv_uni_display(SV *dsv, SV *ssv, STRLEN pvlim, UV flags)
Instead use "toFOLD_utf8_safe".
UV to_utf8_fold(const U8 *p, U8* ustrp, STRLEN *lenp)
Instead use "toLOWER_utf8_safe".
UV to_utf8_lower(const U8 *p, U8* ustrp, STRLEN *lenp)
Instead use "toTITLE_utf8_safe".
UV to_utf8_title(const U8 *p, U8* ustrp, STRLEN *lenp)
Instead use "toUPPER_utf8_safe".
UV to_utf8_upper(const U8 *p, U8* ustrp, STRLEN *lenp)
Bottom level UTF-8 decode routine. Returns the native code point value of the first character in the string "s", which is assumed to be in UTF-8 (or UTF-EBCDIC) encoding, and no longer than "curlen" bytes; *retlen (if "retlen" isn't NULL) will be set to the length, in bytes, of that character.
The value of "flags" determines the behavior when "s" does not point to a well-formed UTF-8 character. If "flags" is 0, encountering a malformation causes zero to be returned and *retlen is set so that ("s" + *retlen) is the next possible position in "s" that could begin a non-malformed character. Also, if UTF-8 warnings haven't been lexically disabled, a warning is raised. Some UTF-8 input sequences may contain multiple malformations. This function tries to find every possible one in each call, so multiple warnings can be raised for the same sequence.
Various ALLOW flags can be set in "flags" to allow (and not warn on) individual types of malformations, such as the sequence being overlong (that is, when there is a shorter sequence that can express the same code point; overlong sequences are expressly forbidden in the UTF-8 standard due to potential security issues). Another malformation example is the first byte of a character not being a legal first byte. See utf8.h for the list of such flags. Even if allowed, this function generally returns the Unicode REPLACEMENT CHARACTER when it encounters a malformation. There are flags in utf8.h to override this behavior for the overlong malformations, but don't do that except for very specialized purposes.
The "UTF8_CHECK_ONLY" flag overrides the behavior when a non-allowed (by other flags) malformation is found. If this flag is set, the routine assumes that the caller will raise a warning, and this function will silently just set "retlen" to "-1" (cast to "STRLEN") and return zero.
Note that this API requires disambiguation between successful decoding a "NUL" character, and an error return (unless the "UTF8_CHECK_ONLY" flag is set), as in both cases, 0 is returned, and, depending on the malformation, "retlen" may be set to 1. To disambiguate, upon a zero return, see if the first byte of "s" is 0 as well. If so, the input was a "NUL"; if not, the input had an error. Or you can use "utf8n_to_uvchr_error".
Certain code points are considered problematic. These are Unicode surrogates, Unicode non-characters, and code points above the Unicode maximum of 0x10FFFF. By default these are considered regular code points, but certain situations warrant special handling for them, which can be specified using the "flags" parameter. If "flags" contains "UTF8_DISALLOW_ILLEGAL_INTERCHANGE", all three classes are treated as malformations and handled as such. The flags "UTF8_DISALLOW_SURROGATE", "UTF8_DISALLOW_NONCHAR", and "UTF8_DISALLOW_SUPER" (meaning above the legal Unicode maximum) can be set to disallow these categories individually. "UTF8_DISALLOW_ILLEGAL_INTERCHANGE" restricts the allowed inputs to the strict UTF-8 traditionally defined by Unicode. Use "UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE" to use the strictness definition given by Unicode Corrigendum #9 <http://www.unicode.org/versions/corrigendum9.html>. The difference between traditional strictness and C9 strictness is that the latter does not forbid non-character code points. (They are still discouraged, however.) For more discussion see "Noncharacter code points" in perlunicode.
The flags "UTF8_WARN_ILLEGAL_INTERCHANGE", "UTF8_WARN_ILLEGAL_C9_INTERCHANGE", "UTF8_WARN_SURROGATE", "UTF8_WARN_NONCHAR", and "UTF8_WARN_SUPER" will cause warning messages to be raised for their respective categories, but otherwise the code points are considered valid (not malformations). To get a category to both be treated as a malformation and raise a warning, specify both the WARN and DISALLOW flags. (But note that warnings are not raised if lexically disabled nor if "UTF8_CHECK_ONLY" is also specified.)
Extremely high code points were never specified in any standard, and require an extension to UTF-8 to express, which Perl does. It is likely that programs written in something other than Perl would not be able to read files that contain these; nor would Perl understand files written by something that uses a different extension. For these reasons, there is a separate set of flags that can warn and/or disallow these extremely high code points, even if other above-Unicode ones are accepted. They are the "UTF8_WARN_PERL_EXTENDED" and "UTF8_DISALLOW_PERL_EXTENDED" flags. For more information see ""UTF8_GOT_PERL_EXTENDED"". Of course "UTF8_DISALLOW_SUPER" will treat all above-Unicode code points, including these, as malformations. (Note that the Unicode standard considers anything above 0x10FFFF to be illegal, but there are standards predating it that allow up to 0x7FFF_FFFF (2**31 -1))
A somewhat misleadingly named synonym for "UTF8_WARN_PERL_EXTENDED" is retained for backward compatibility: "UTF8_WARN_ABOVE_31_BIT". Similarly, "UTF8_DISALLOW_ABOVE_31_BIT" is usable instead of the more accurately named "UTF8_DISALLOW_PERL_EXTENDED". The names are misleading because these flags can apply to code points that actually do fit in 31 bits. This happens on EBCDIC platforms, and sometimes when the overlong malformation is also present. The new names accurately describe the situation in all cases.
All other code points corresponding to Unicode characters, including private use and those yet to be assigned, are never considered malformed and never warn.
UV utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, const U32 flags)
This function is for code that needs to know what the precise malformation(s) are when an error is found. If you also need to know the generated warning messages, use "utf8n_to_uvchr_msgs"() instead.
It is like "utf8n_to_uvchr" but it takes an extra parameter placed after all the others, "errors". If this parameter is 0, this function behaves identically to "utf8n_to_uvchr". Otherwise, "errors" should be a pointer to a "U32" variable, which this function sets to indicate any errors found. Upon return, if *errors is 0, there were no errors found. Otherwise, *errors is the bit-wise "OR" of the bits described in the list below. Some of these bits will be set if a malformation is found, even if the input "flags" parameter indicates that the given malformation is allowed; those exceptions are noted:
Code points above 0x7FFF_FFFF (2**31 - 1) were never specified in any standard, and so some extension must be used to express them. Perl uses a natural extension to UTF-8 to represent the ones up to 2**36-1, and invented a further extension to represent even higher ones, so that any code point that fits in a 64-bit word can be represented. Text using these extensions is not likely to be portable to non-Perl code. We lump both of these extensions together and refer to them as Perl extended UTF-8. There exist other extensions that people have invented, incompatible with Perl's.
On EBCDIC platforms starting in Perl v5.24, the Perl extension for representing extremely high code points kicks in at 0x3FFF_FFFF (2**30 -1), which is lower than on ASCII. Prior to that, code points 2**31 and higher were simply unrepresentable, and a different, incompatible method was used to represent code points between 2**30 and 2**31 - 1.
On both platforms, ASCII and EBCDIC, "UTF8_GOT_PERL_EXTENDED" is set if Perl extended UTF-8 is used.
In earlier Perls, this bit was named "UTF8_GOT_ABOVE_31_BIT", which you still may use for backward compatibility. That name is misleading, as this flag may be set when the code point actually does fit in 31 bits. This happens on EBCDIC platforms, and sometimes when the overlong malformation is also present. The new name accurately describes the situation in all cases.
Until Unicode 3.1, it was legal for programs to accept this malformation, but it was discovered that this created security issues.
"UTF8_GOT_SHORT" and "UTF8_GOT_NON_CONTINUATION" both indicate a too short sequence. The difference is that "UTF8_GOT_NON_CONTINUATION" indicates always that there is an error, while "UTF8_GOT_SHORT" means that an incomplete sequence was looked at. If no other flags are present, it means that the sequence was valid as far as it went. Depending on the application, this could mean one of three things:
To do your own error handling, call this function with the "UTF8_CHECK_ONLY" flag to suppress any warnings, and then examine the *errors return.
UV utf8n_to_uvchr_error(const U8 *s, STRLEN curlen, STRLEN *retlen, const U32 flags, U32 * errors)
THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES. Most code should use "utf8_to_uvchr_buf"() rather than call this directly.
This function is for code that needs to know what the precise malformation(s) are when an error is found, and wants the corresponding warning and/or error messages to be returned to the caller rather than be displayed. All messages that would have been displayed if all lexcial warnings are enabled will be returned.
It is just like "utf8n_to_uvchr_error" but it takes an extra parameter placed after all the others, "msgs". If this parameter is 0, this function behaves identically to "utf8n_to_uvchr_error". Otherwise, "msgs" should be a pointer to an "AV *" variable, in which this function creates a new AV to contain any appropriate messages. The elements of the array are ordered so that the first message that would have been displayed is in the 0th element, and so on. Each element is a hash with three key-value pairs, as follows:
It's important to note that specifying this parameter as non-null will cause any warnings this function would otherwise generate to be suppressed, and instead be placed in *msgs. The caller can check the lexical warnings state (or not) when choosing what to do with the returned messages.
If the flag "UTF8_CHECK_ONLY" is passed, no warnings are generated, and hence no AV is created.
The caller, of course, is responsible for freeing any returned AV.
UV utf8n_to_uvchr_msgs(const U8 *s, STRLEN curlen, STRLEN *retlen, const U32 flags, U32 * errors, AV ** msgs)
This function was useful for code that wanted to handle both EBCDIC and ASCII platforms with Unicode properties, but starting in Perl v5.20, the distinctions between the platforms have mostly been made invisible to most code, so this function is quite unlikely to be what you want. If you do need this precise functionality, use instead "NATIVE_TO_UNI(utf8_to_uvchr_buf(...))" or "NATIVE_TO_UNI(utf8n_to_uvchr(...))".
UV utf8n_to_uvuni(const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
STRLEN UTF8SKIP(char* s)
WARNING: use only if you *know* that the pointers point inside the same UTF-8 buffer.
IV utf8_distance(const U8 *a, const U8 *b)
WARNING: do not use the following unless you *know* "off" is within the UTF-8 data pointed to by "s" *and* that on entry "s" is aligned on the first byte of character or just after the last byte of a character.
U8* utf8_hop(const U8 *s, SSize_t off)
"off" must be non-positive.
"s" must be after or equal to "start".
When moving backward it will not move before "start".
Will not exceed this limit even if the string is not valid "UTF-8".
U8* utf8_hop_back(const U8 *s, SSize_t off, const U8 *start)
"off" must be non-negative.
"s" must be before or equal to "end".
When moving forward it will not move beyond "end".
Will not exceed this limit even if the string is not valid "UTF-8".
U8* utf8_hop_forward(const U8 *s, SSize_t off, const U8 *end)
When moving backward it will not move before "start".
When moving forward it will not move beyond "end".
Will not exceed those limits even if the string is not valid "UTF-8".
U8* utf8_hop_safe(const U8 *s, SSize_t off, const U8 *start, const U8 *end)
In spite of the name, this macro gives the correct result if the input string from which "c" comes is not encoded in UTF-8.
See "UVCHR_IS_INVARIANT" for checking if a UV is invariant.
bool UTF8_IS_INVARIANT(char c)
bool UTF8_IS_NONCHAR(const U8 *s, const U8 *e)
This macro evaluates to non-zero if the first few bytes of the string starting at "s" and looking no further than "e - 1" are from this UTF-8 extension; otherwise it evaluates to 0. If non-zero, the value gives how many bytes starting at "s" comprise the code point's representation.
0 is returned if the bytes are not well-formed extended UTF-8, or if they represent a code point that cannot fit in a UV on the current platform. Hence this macro can give different results when run on a 64-bit word machine than on one with a 32-bit word size.
Note that it is illegal to have code points that are larger than what can fit in an IV on the current machine.
bool UTF8_IS_SUPER(const U8 *s, const U8 *e)
bool UTF8_IS_SURROGATE(const U8 *s, const U8 *e)
If "e < s" or if the scan would end up past "e", it raises a UTF8 warning and returns the number of valid characters.
STRLEN utf8_length(const U8* s, const U8 *e)
STRLEN UTF8_SAFE_SKIP(char* s, char* e)
Converts a string "s" of length *lenp from UTF-8 into native byte encoding. Unlike "bytes_to_utf8", this over-writes the original string, and updates *lenp to contain the new length. Returns zero on failure (leaving "s" unchanged) setting *lenp to -1.
Upon successful return, the number of variants in the string can be computed by having saved the value of *lenp before the call, and subtracting the after-call value of *lenp from it.
If you need a copy of the string, see "bytes_from_utf8".
U8* utf8_to_bytes(U8 *s, STRLEN *lenp)
Returns the native code point of the first character in the string "s" which is assumed to be in UTF-8 encoding; "retlen" will be set to the length, in bytes, of that character.
Some, but not all, UTF-8 malformations are detected, and in fact, some malformed input could cause reading beyond the end of the input buffer, which is why this function is deprecated. Use "utf8_to_uvchr_buf" instead.
If "s" points to one of the detected malformations, and UTF8 warnings are enabled, zero is returned and *retlen is set (if "retlen" isn't "NULL") to -1. If those warnings are off, the computed value if well-defined (or the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and *retlen is set (if "retlen" isn't NULL) so that ("s" + *retlen) is the next possible position in "s" that could begin a non-malformed character. See "utf8n_to_uvchr" for details on when the REPLACEMENT CHARACTER is returned.
UV utf8_to_uvchr(const U8 *s, STRLEN *retlen)
If "s" does not point to a well-formed UTF-8 character and UTF8 warnings are enabled, zero is returned and *retlen is set (if "retlen" isn't "NULL") to -1. If those warnings are off, the computed value, if well-defined (or the Unicode REPLACEMENT CHARACTER if not), is silently returned, and *retlen is set (if "retlen" isn't "NULL") so that ("s" + *retlen) is the next possible position in "s" that could begin a non-malformed character. See "utf8n_to_uvchr" for details on when the REPLACEMENT CHARACTER is returned.
UV utf8_to_uvchr_buf(const U8 *s, const U8 *send, STRLEN *retlen)
Only in very rare circumstances should code need to be dealing in Unicode (as opposed to native) code points. In those few cases, use "NATIVE_TO_UNI(utf8_to_uvchr_buf(...))" instead. If you are not absolutely sure this is one of those cases, then assume it isn't and use plain "utf8_to_uvchr_buf" instead.
Returns the Unicode (not-native) code point of the first character in the string "s" which is assumed to be in UTF-8 encoding; "send" points to 1 beyond the end of "s". "retlen" will be set to the length, in bytes, of that character.
If "s" does not point to a well-formed UTF-8 character and UTF8 warnings are enabled, zero is returned and *retlen is set (if "retlen" isn't NULL) to -1. If those warnings are off, the computed value if well-defined (or the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and *retlen is set (if "retlen" isn't NULL) so that ("s" + *retlen) is the next possible position in "s" that could begin a non-malformed character. See "utf8n_to_uvchr" for details on when the REPLACEMENT CHARACTER is returned.
UV utf8_to_uvuni_buf(const U8 *s, const U8 *send, STRLEN *retlen)
bool UVCHR_IS_INVARIANT(UV cp)
STRLEN UVCHR_SKIP(UV cp)
d = uvchr_to_utf8(d, uv);
is the recommended wide native character-aware way of saying
*(d++) = uv;
This function accepts any code point from 0.."IV_MAX" as input. "IV_MAX" is typically 0x7FFF_FFFF in a 32-bit word.
It is possible to forbid or warn on non-Unicode code points, or those that may be problematic by using "uvchr_to_utf8_flags".
U8* uvchr_to_utf8(U8 *d, UV uv)
d = uvchr_to_utf8_flags(d, uv, flags);
or, in most cases,
d = uvchr_to_utf8_flags(d, uv, 0);
This is the Unicode-aware way of saying
*(d++) = uv;
If "flags" is 0, this function accepts any code point from 0.."IV_MAX" as input. "IV_MAX" is typically 0x7FFF_FFFF in a 32-bit word.
Specifying "flags" can further restrict what is allowed and not warned on, as follows:
If "uv" is a Unicode surrogate code point and "UNICODE_WARN_SURROGATE" is set, the function will raise a warning, provided UTF8 warnings are enabled. If instead "UNICODE_DISALLOW_SURROGATE" is set, the function will fail and return NULL. If both flags are set, the function will both warn and return NULL.
Similarly, the "UNICODE_WARN_NONCHAR" and "UNICODE_DISALLOW_NONCHAR" flags affect how the function handles a Unicode non-character.
And likewise, the "UNICODE_WARN_SUPER" and "UNICODE_DISALLOW_SUPER" flags affect the handling of code points that are above the Unicode maximum of 0x10FFFF. Languages other than Perl may not be able to accept files that contain these.
The flag "UNICODE_WARN_ILLEGAL_INTERCHANGE" selects all three of the above WARN flags; and "UNICODE_DISALLOW_ILLEGAL_INTERCHANGE" selects all three DISALLOW flags. "UNICODE_DISALLOW_ILLEGAL_INTERCHANGE" restricts the allowed inputs to the strict UTF-8 traditionally defined by Unicode. Similarly, "UNICODE_WARN_ILLEGAL_C9_INTERCHANGE" and "UNICODE_DISALLOW_ILLEGAL_C9_INTERCHANGE" are shortcuts to select the above-Unicode and surrogate flags, but not the non-character ones, as defined in Unicode Corrigendum #9 <http://www.unicode.org/versions/corrigendum9.html>. See "Noncharacter code points" in perlunicode.
Extremely high code points were never specified in any standard, and require an extension to UTF-8 to express, which Perl does. It is likely that programs written in something other than Perl would not be able to read files that contain these; nor would Perl understand files written by something that uses a different extension. For these reasons, there is a separate set of flags that can warn and/or disallow these extremely high code points, even if other above-Unicode ones are accepted. They are the "UNICODE_WARN_PERL_EXTENDED" and "UNICODE_DISALLOW_PERL_EXTENDED" flags. For more information see ""UTF8_GOT_PERL_EXTENDED"". Of course "UNICODE_DISALLOW_SUPER" will treat all above-Unicode code points, including these, as malformations. (Note that the Unicode standard considers anything above 0x10FFFF to be illegal, but there are standards predating it that allow up to 0x7FFF_FFFF (2**31 -1))
A somewhat misleadingly named synonym for "UNICODE_WARN_PERL_EXTENDED" is retained for backward compatibility: "UNICODE_WARN_ABOVE_31_BIT". Similarly, "UNICODE_DISALLOW_ABOVE_31_BIT" is usable instead of the more accurately named "UNICODE_DISALLOW_PERL_EXTENDED". The names are misleading because on EBCDIC platforms,these flags can apply to code points that actually do fit in 31 bits. The new names accurately describe the situation in all cases.
U8* uvchr_to_utf8_flags(U8 *d, UV uv, UV flags)
THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES.
Most code should use ""uvchr_to_utf8_flags"()" rather than call this directly.
This function is for code that wants any warning and/or error messages to be returned to the caller rather than be displayed. All messages that would have been displayed if all lexical warnings are enabled will be returned.
It is just like "uvchr_to_utf8_flags" but it takes an extra parameter placed after all the others, "msgs". If this parameter is 0, this function behaves identically to "uvchr_to_utf8_flags". Otherwise, "msgs" should be a pointer to an "HV *" variable, in which this function creates a new HV to contain any appropriate messages. The hash has three key-value pairs, as follows:
It's important to note that specifying this parameter as non-null will cause any warnings this function would otherwise generate to be suppressed, and instead be placed in *msgs. The caller can check the lexical warnings state (or not) when choosing what to do with the returned messages.
The caller, of course, is responsible for freeing any returned HV.
U8* uvchr_to_utf8_flags_msgs(U8 *d, UV uv, UV flags, HV ** msgs)
This function is like them, but the input is a strict Unicode (as opposed to native) code point. Only in very rare circumstances should code not be using the native code point.
For details, see the description for "uvchr_to_utf8_flags".
U8* uvoffuni_to_utf8_flags(U8 *d, UV uv, const UV flags)
This function is a deprecated synonym for "uvoffuni_to_utf8_flags", which itself, while not deprecated, should be used only in isolated circumstances. These functions were useful for code that wanted to handle both EBCDIC and ASCII platforms with Unicode properties, but starting in Perl v5.20, the distinctions between the platforms have mostly been made invisible to most code, so this function is quite unlikely to be what you want.
U8* uvuni_to_utf8_flags(U8 *d, UV uv, UV flags)
UV valid_utf8_to_uvchr(const U8 *s, STRLEN *retlen)
XS_APIVERSION_BOOTCHECK;
XS_VERSION_BOOTCHECK;
bool ckWARN(U32 w)
bool ckWARN2(U32 w1, U32 w2)
bool ckWARN3(U32 w1, U32 w2, U32 w3)
bool ckWARN4(U32 w1, U32 w2, U32 w3, U32 w4)
bool ckWARN_d(U32 w)
bool ckWARN2_d(U32 w1, U32 w2)
bool ckWARN3_d(U32 w1, U32 w2, U32 w3)
bool ckWARN4_d(U32 w1, U32 w2, U32 w3, U32 w4)
Take a sprintf-style format pattern and argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for "mess_sv".
The error message will be used as an exception, by default returning control to the nearest enclosing "eval", but subject to modification by a $SIG{__DIE__} handler. In any case, the "croak" function never returns normally.
For historical reasons, if "pat" is null then the contents of "ERRSV" ($@) will be used as an error message or object instead of building an error message from arguments. If you want to throw a non-string object, or build an error message in an SV yourself, it is preferable to use the "croak_sv" function, which does not involve clobbering "ERRSV".
void croak(const char *pat, ...)
void croak_no_modify()
"baseex" is the error message or object. If it is a reference, it will be used as-is. Otherwise it is used as a string, and if it does not end with a newline then it will be extended with some indication of the current location in the code, as described for "mess_sv".
The error message or object will be used as an exception, by default returning control to the nearest enclosing "eval", but subject to modification by a $SIG{__DIE__} handler. In any case, the "croak_sv" function never returns normally.
To die with a simple string message, the "croak" function may be more convenient.
void croak_sv(SV *baseex)
OP * die(const char *pat, ...)
OP * die_sv(SV *baseex)
"pat" and "args" are a sprintf-style format pattern and encapsulated argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for "mess_sv".
The error message will be used as an exception, by default returning control to the nearest enclosing "eval", but subject to modification by a $SIG{__DIE__} handler. In any case, the "croak" function never returns normally.
For historical reasons, if "pat" is null then the contents of "ERRSV" ($@) will be used as an error message or object instead of building an error message from arguments. If you want to throw a non-string object, or build an error message in an SV yourself, it is preferable to use the "croak_sv" function, which does not involve clobbering "ERRSV".
void vcroak(const char *pat, va_list *args)
"pat" and "args" are a sprintf-style format pattern and encapsulated argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for "mess_sv".
The error message or object will by default be written to standard error, but this is subject to modification by a $SIG{__WARN__} handler.
Unlike with "vcroak", "pat" is not permitted to be null.
void vwarn(const char *pat, va_list *args)
Take a sprintf-style format pattern and argument list. These are used to generate a string message. If the message does not end with a newline, then it will be extended with some indication of the current location in the code, as described for "mess_sv".
The error message or object will by default be written to standard error, but this is subject to modification by a $SIG{__WARN__} handler.
Unlike with "croak", "pat" is not permitted to be null.
void warn(const char *pat, ...)
"baseex" is the error message or object. If it is a reference, it will be used as-is. Otherwise it is used as a string, and if it does not end with a newline then it will be extended with some indication of the current location in the code, as described for "mess_sv".
The error message or object will by default be written to standard error, but this is subject to modification by a $SIG{__WARN__} handler.
To warn with a simple string message, the "warn" function may be more convenient.
void warn_sv(SV *baseex)
If you feel you need to use one of these functions, first send email to<EMAIL_ADDRESS><EMAIL_ADDRESS>It may be that there is a good reason for the function not being documented, and it should be removed from this list; or it may just be that no one has gotten around to documenting it. In the latter case, you will be asked to submit a patch to document the function. Once your patch is accepted, it will indicate that the interface is stable (unless it is explicitly marked otherwise) and usable by you.
With lots of help and suggestions from Dean Roehrich, Malcolm Beattie, Andreas Koenig, Paul Hudson, Ilya Zakharevich, Paul Marquess, Neil Bowers, Matthew Green, Tim Bunce, Spider Boardman, Ulrich Pfeifer, Stephen McCamant, and Gurusamy Sarathy.
API Listing originally by Dean Roehrich<EMAIL_ADDRESS>Updated to be autogenerated from comments in the source by Benjamin Stuhl.
| 2020-06-21 | perl v5.30.3 |


{% extends "base.html" %}
{% load static %}
{% load staticfiles %}
{% block head_title %}Home | {{ block.super }}{% endblock %}
{% block header %}
Rental Service Renting made easy
Start Renting
First of all create your account from the signup section. After that you are all set find the best place to rent or the tenent for your rental.
After your create your account you can browse and search the rentals from the rentals section. You can also search for rentals from the navbar.
As you browse the rentals you can mark yourself as intrested in the rentals and update your profile which makes the landlords easy to find and contact you.
No rentals Available
{% endif %} {% if rentals_list %} View All {% endif %} {% if intrested_rentals_list %}


Patrik Drhlík
freelance data scientist
South Park episode transcripts
IMDB South Park episode ratings
Main R packages: tidyverse, tidytext, southparkr
## Observations: 312,767
## Variables: 16
## $ season <fct> Season Thirteen, Season One, Season Sixt...
## $ season_number <int> 13, 1, 16, 5, 15, 3, 11, 9, 13, 3, 21, 8...
## $ season_episode_number <dbl> 7, 10, 14, 10, 10, 4, 1, 2, 5, 15, 6, 1,...
## $ episode <fct> Fatbeard, Damien, Obama Wins!, How to Ea...
## $ episode_number <int> 188, 10, 237, 75, 219, 35, 154, 127, 186...
## $ character <chr> "cartman", "stan", "kyle", "jonesy", "mr...
## $ year <int> 2009, 1997, 2012, 2001, 2011, 1999, 2007...
## $ line_number <int> 63817, 4528, 76451, 31001, 72011, 16346,...
## $ word <chr> "hey", "bubye", "program", "wrong", "gen...
## $ word_stem <chr> "hei", "buby", "program", "wrong", "gene...
## $ swear_word <lgl> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
## $ episode_name <chr> "Fatbeard", "Damien", "Obama Wins!", "Ho...
## $ air_date <date> 2009-04-22, 1998-02-04, 2012-11-07, 200...
## $ user_rating <dbl> 8.2, 8.1, 7.5, 8.1, 7.6, 6.7, 8.8, 8.8, ...
## $ user_votes <dbl> 1578, 1703, 1156, 1488, 1229, 1546, 2356...
## $ score <int> NA, NA, NA, -2, 2, NA, NA, NA, NA, NA, N...
| 21 | Number of seasons |
| 287 | Number of episodes |
| 914 475 | Number of words |
| 312 767 | No stopwords (a, the, this, ...) |
| 6 170 | Number of swear words |
| 1.97 | % of swear words |
| 34.2 | % used for analysis |
| 4 403 | Number of characters |
| 8.14 | Mean IMDB rating |
| 9.6 | Scott Tenorman Must Die (S05E04) |
| 6.3 | A Million Little Fibers (S10E05) |


Are you a faculty member looking to enrich your learning environment? Are you
involved with long-distance learning or hoping to extend the reach of your
content online? Kaltura might be the solution you are searching for. As some
of you may have heard, Penn State recently purchased the Kaltura service.
Kaltura is a new media management platform that allows users to easily store,
manage, and share their media content in one central location. As one of the
college’s liaisons for this upcoming transition, we wanted to let you know
some important details moving forward.
First, you can expect this service to begin the week of August 20th. At this
point, you will be able to access Kaltura to start uploading media content and
exploring relevant features. Currently, there are a number of ways to upload
your content to Kaltura including Canvas (My Media), Kaltura capture, Zoom
integration through the cloud, and psu.mediaspace.kalutra.com.
For those using Adobe Connect to serve their media content, you should know
that Adobe Connect will only be available through the Fall semester. After the
Fall semester concludes, Adobe Connect will be set to ‘read only’ allowing
users to access and see their content, but restricting new uploads and/or
downloads. In May 2019, Adobe Connect will be shut down completely, so all
necessary content migration should be completed by then.
Moving forward our team will be in direct contact with the Kaltura
implementation team to address concerns and relay faculty feedback. We
encourage everyone to start exploring Kaltura. We also suggest hitting up
these resources for additional information:
Panicking yet? Worried about migrating your content? Don’t! New technology is
fun and exciting; we are here to help guide you through the process. Whether
you need help understanding the ‘next steps’ or you just need a quick
demonstration of Kaltura and what it has to offer - we’re only an email away.
Reach out and let one of our knowledgable team members help get you started.


HTML stands for HyperText Markup Language, and Hyper Links is what makes the web a web.
the HTML is made ofText(content), Maerkup(what it looks like), Reference to other documents
(pages, videos), link to other pages.
Thank you for reading.


{% extends "payments/base.html" %} {% block title %}Purchase a Subscription{% endblock title %} {% block body %} {% with request.user.customer.current_subscription as subscription %} {% if not subscription or subscription.status != 'active' %} {% include "payments/_subscription_status.html" %} {% include "payments/_subscribe_form.html" %} {% else %}
You currently already have an active subscription, which will automatically renew in {{ subscription.current_period_end|timeuntil }}.


Health Insurance Risk Calculator
Freiberg and Sons Insurance
Instructions
This application helps you determine the risk associated with insuring a new customer.
The application will ask you for the customer's body-mass index,
blood pressure, age, and family history of disease. After answering all questions,
the application will give a final risk score as well as the customer's final risk category.
What is the customer's age?
18 - 30 years old
31 - 45 years old
46 - 60 years old
61+ years old
What is the customer's weight?
90 lbs - 110 lbs
111 lbs - 130 lbs
131 lbs - 150 lbs
151 lbs - 170 lbs
171 lbs - 190 lbs
191 lbs - 210 lbs
211 lbs - 230 lbs
231 lbs - 250 lbs
251 lbs - 270 lbs
271 lbs - 290 lbs
What is the customer's height?
4' - 4'3"
4'4" - 4'6"
4'7" - 4'9"
4'10" - 5'
5'1" - 5'3"
5'4" - 5'6"
5'7" - 5'9"
5'10" - 6'
6'1" - 6'3"
6'4" - 6'6"
6'7" - 6'9"
6'10" - 7'
Calculate Body-Mass Index (BMI)
Based on the BMI given above, what range does your customer's BMI fall in?
10 - 24.9
25 - 29.9
30+
What is the customer's blood pressure?
Systolic mm Hg is less than 120 and Diastolic mm Hg is less than 80
Systolic mm Hg is between 121 - 129 and Diastolic mm Hg is less than 80
Systolic mm Hg is between 130 - 139 or Diastolic mm Hg is between 81 - 89
Systolic mm Hg is between 140 - 179 or Diastolic mm Hg is between 90 - 119
Systolic mm Hg is 180+ or Diastolic mm Hg (lower number) is 120+
Is there family history of diabetes?
No
Yes
Is there family history of cancer?
No
Yes
Is there family history of Alzheimers?
No
Yes
Calculate Total Score and Risk Category


[gecode-users] How to install Gecode installed the Gecode/J using cygwin
Debdeep
debdeep.banerjee at rsise.anu.edu.au
Sat Nov 24 01:39:56 CET 2007
hi,
Guido Tack wrote:
> You have to have pkg-config installed when you configure Gecode 1.3.1
> (you can get it from cygwin). Then configure will detect that
> pkg-config is present and generate the necessary files, which will be
> installed in <prefix>/lib/pkgconfig upon make install. You should
> then set the PKG_CONFIG_PATH to include that directory. After these
> steps, the Gecode/J configure should find the files.
>
After compiling I have got the following files and directories under the
GECODE directory
===========================================================
LICENSE
Makefile
Makefile.contribs
Makefile.dep
Makefile.in
changelog.in
config.log
config.status
configure
configure.ac
configure.ac.in
contribs
doxygen.conf
doxygen.conf.in
doxygen.hh
doxygen.hh.in
examples
gecode
gecode.m4
install-sh
libgecodeint.dll
libgecodekernel.dll
libgecodeminimodel.dll
libgecodesearch.dll
libgecodeset.dll
misc
test
==================================================
I could not find the /lib/pkg-config directory.
I have attached the config.log file, if it can help.
With regards
Debdeep
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config.log
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20071124/43eaef3c/attachment.asc>
More information about the gecode-users
mailing list


Select Payment Method
Credit Card
Net Banking
PayPal
Debit Card
Credit Card Info
Amount
NAME ON CARD
CARD NUMBER
EXPIRATION
CVV NUMBER
SEND
Net Banking
HBL Bank
Mezan Bank
Bank of Punjab
Allied Bank
UBL Bank
Islamic Bank
Alfalah Islamic Bank
MCB Bank
Askari Bank
State Bank Of Pakistan
Bank Al-Habib
Al Barakah Bank
City Bank
First Female Bank
Faysal Bank
Habib Metropolitan Limited
JS Bank
JS Islamic Bank
Federal Bank
Bank Al-Islamic
CONTINUE
PayPal
Already Have A PayPal Account?
Login
Remember me?
Debit Card Info
Amount
NAME ON CARD
CARD NUMBER
EXPIRATION
CVV NUMBER
SEND


User Profile
{{customerName}}
keyboard_arrow_down
person
My Profile
exit_to_app
Logout
Alarm List
notifications
Help Application
help
Right Side Bar
reorder
Masters Options
User list
people
Users
Product list
invert_colors
Products
Manage Infraestructure
build
Infraestructure
Manage CAN bus
settings_input_svideo
CAN bus
Management Options
Visualize Infraestructure
desktop_mac
Visualize
Manage Orders
flash_on
Orders
Sidenav Right
Close Sidenav Right


Stone Paper Scissor
Welcome to the game
Here you are playing against the computer
We used a pseudo AI for this game
This AI will play against you
Let's see who's gonna win this game
Good luck!
Press s or S for stone
Press p or P for paper
Press x or X for scissors
{% if s %}
Your score is
{% print(s) %}
{%print(total_score)%} {% endif %}


Create a new user / Edit user<EMAIL_ADDRESS>Save
If you want to change your password, fill the following two fields, please.
New password
Verify password


RESTful-in-peace Project API API Reference
Spring Boot REST API
API Endpoint
http://localhost:8080/
Contact<EMAIL_ADDRESS>Version: 0.0.1
appointment-controller
Appointment Controller
getAll
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
deleteAppointment
OK
No Content
Unauthorized
Forbidden
Response Content-Types: */*
Response Example (200 OK)
"object"
insertAppointment
appointment
Request Content-Types: application/json
Request Example
{
"date_time": "string (date-time)",
"doctor": {
"created": "string (date-time)",
"dept": "string",
"id": "integer (int64)",
"joining": "string (date-time)",
"name": "string"
},
"doctor_id": "integer (int64)",
"id": "integer (int64)",
"patient": {
"age": "integer (int32)",
"created": "string (date-time)",
"gender": "string",
"id": "integer (int64)",
"mobile": "string",
"name": "string",
"occupation": "string",
"symptom_summary": "string"
},
"patient_id": "integer (int64)",
"prescription": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
updateAppointment
appointment
Request Content-Types: application/json
Request Example
{
"date_time": "string (date-time)",
"doctor": {
"created": "string (date-time)",
"dept": "string",
"id": "integer (int64)",
"joining": "string (date-time)",
"name": "string"
},
"doctor_id": "integer (int64)",
"id": "integer (int64)",
"patient": {
"age": "integer (int32)",
"created": "string (date-time)",
"gender": "string",
"id": "integer (int64)",
"mobile": "string",
"name": "string",
"occupation": "string",
"symptom_summary": "string"
},
"patient_id": "integer (int64)",
"prescription": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
doctor-controller
Doctor Controller
deleteDoctor
OK
No Content
Unauthorized
Forbidden
Response Content-Types: */*
Response Example (200 OK)
"object"
findOne
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
createDoctor
doctor
Request Content-Types: application/json
Request Example
{
"created": "string (date-time)",
"dept": "string",
"id": "integer (int64)",
"joining": "string (date-time)",
"name": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
update
doctor
Request Content-Types: application/json
Request Example
{
"created": "string (date-time)",
"dept": "string",
"id": "integer (int64)",
"joining": "string (date-time)",
"name": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
patient-controller
Patient Controller
deletePatient
OK
No Content
Unauthorized
Forbidden
Response Content-Types: */*
Response Example (200 OK)
"object"
createPatient
patient
Request Content-Types: application/json
Request Example
{
"age": "integer (int32)",
"created": "string (date-time)",
"gender": "string",
"id": "integer (int64)",
"mobile": "string",
"name": "string",
"occupation": "string",
"symptom_summary": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
findOne
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
update
patient
Request Content-Types: application/json
Request Example
{
"age": "integer (int32)",
"created": "string (date-time)",
"gender": "string",
"id": "integer (int64)",
"mobile": "string",
"name": "string",
"occupation": "string",
"symptom_summary": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
role-controller
Role Controller
deleteRole
OK
No Content
Unauthorized
Forbidden
Response Content-Types: */*
Response Example (200 OK)
"object"
deleteUserRole
OK
No Content
Unauthorized
Forbidden
Response Content-Types: */*
Response Example (200 OK)
"object"
addRole
role
Request Content-Types: application/json
Request Example
{
"id": "integer (int64)",
"name": "string",
"status": "string"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
addUserRole
userRole
Request Content-Types: application/json
Request Example
{
"id": "integer (int64)",
"role": {
"id": "integer (int64)",
"name": "string",
"status": "string"
},
"roleId": "integer (int64)",
"userId": "integer (int64)"
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
getRoles
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
"object"
Schema Definitions
Appointment: object
Example
{
"date_time": "string (date-time)",
"doctor": {
"created": "string (date-time)",
"dept": "string",
"id": "integer (int64)",
"joining": "string (date-time)",
"name": "string"
},
"doctor_id": "integer (int64)",
"id": "integer (int64)",
"patient": {
"age": "integer (int32)",
"created": "string (date-time)",
"gender": "string",
"id": "integer (int64)",
"mobile": "string",
"name": "string",
"occupation": "string",
"symptom_summary": "string"
},
"patient_id": "integer (int64)",
"prescription": "string"
}
Doctor: object
- created: string (date-time)
- dept: string
- id: integer (int64)
- joining: string (date-time)
- name: string
Example
{
"created": "string (date-time)",
"dept": "string",
"id": "integer (int64)",
"joining": "string (date-time)",
"name": "string"
}
Patient: object
- age: integer (int32)
- created: string (date-time)
- gender: string
- id: integer (int64)
- mobile: string
- name: string
- occupation: string
- symptom_summary: string
Example
{
"age": "integer (int32)",
"created": "string (date-time)",
"gender": "string",
"id": "integer (int64)",
"mobile": "string",
"name": "string",
"occupation": "string",
"symptom_summary": "string"
}
Role: object
- id: integer (int64)
- name: string
- status: string
Example
{
"id": "integer (int64)",
"name": "string",
"status": "string"
}
UserRole: object
- id: integer (int64)
- role: Role
- roleId: integer (int64)
- userId: integer (int64)
Example
{
"id": "integer (int64)",
"role": {
"id": "integer (int64)",
"name": "string",
"status": "string"
},
"roleId": "integer (int64)",
"userId": "integer (int64)"
}


Uses of Class
unifeat.featureSelection.filter.FilterType
Package
Description
-
Uses of FilterType in unifeat.featureSelection.filter
Modifier and TypeClassDescriptionclass
This java class is used to define the names of non weighted filter-based feature selection methods.class
This java class is used to define the names of weighted filter-based feature selection methods.Modifier and TypeFieldDescriptionstatic final FilterType
FilterType.FISHER_SCORE
static final FilterType
FilterType.GAIN_RATIO
static final FilterType
FilterType.GINI_INDEX
static final FilterType
FilterType.INFORMATION_GAIN
static final FilterType
FilterType.IRRFSACO_1
static final FilterType
FilterType.IRRFSACO_2
static final FilterType
FilterType.LAPLACIAN_SCORE
static final FilterType
FilterType.MGSACO
static final FilterType
FilterType.MRMR
static final FilterType
FilterType.MUTUAL_CORRELATION
static final FilterType
FilterType.NONE
static final FilterType
FilterType.RRFS
static final FilterType
FilterType.RRFSACO_1
static final FilterType
FilterType.RRFSACO_2
static final FilterType
FilterType.RSM
static final FilterType
FilterType.SYMMETRICAL_UNCERTAINTY
static final FilterType
FilterType.TERM_VARIANCE
static final FilterType
FilterType.UFSACO
Modifier and TypeMethodDescriptionstatic FilterType
Converts the filter method name to FilterTypeModifier and TypeMethodDescriptionstatic FilterApproach
FilterApproach.newMethod
(FilterType type, boolean isSupervised, Object... arguments) This method creates new object from one of the classes that has been inherited from the FilterApproach class according to type of the feature selection method.static WeightedFilterApproach
WeightedFilterApproach.newMethod
(FilterType type, boolean isSupervised, Object... arguments) This method creates new object from one of the classes that has been inherited from the WeightedFilterApproach class according to type of the feature selection method. -
Uses of FilterType in unifeat.featureSelection.filter.supervised
Modifier and TypeClassDescriptionclass
This java class is used to define the names of supervised filter-based feature selection methods. -
Uses of FilterType in unifeat.featureSelection.filter.unsupervised
Modifier and TypeClassDescriptionclass
This java class is used to define the names of unsupervised filter-based feature selection methods.


Display
This test category contains test case meant to verify that the display requirements are met. These tests use a client that understands HTML5 and JavaScript. Most modern browsers will do that.
- DISPLAY-0010 - Display contains current conditions and forecast information
- DISPLAY-0020 - Display contains current conditions and forecast information with JavaScript off on browser
- DISPLAY-0030 - If JavaScript is enabled, the user has the ability to see more detailed information.
- DISPLAY-0040 - Display contains current conditions and forecast information at a location with alerts
- DISPLAY-0050 - Display uses HTML5


Copyright (c) Pedro Sena 1994
FILM TITLE: GINGER & FRED DIRECTOR: FEDERICO FELLINI COUNTRY: ITALY 1986 CINEMATOGRAPHY: Tonino Delli Colli, Ennio Guarnieri CAST: Marcello Mastroianni, Giulietta Masina, Franco Fabrizi SUPER FEATURES: It's a Fellini film.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
It seems that I have become more curios about this director since his honorary Oscar, this past year. While he is not a great writer of film, he is a fun director to watch, because like Jean Luc Godard, he is quite impossible to predict. There are some stories here and there, and this film has it, but all in all, it isn't the story of two dancers that entertained the ballrooms of Europe by doing their imitation of the famous pair, as much as it is the story of Fellini's opinion of the very Rome he lives in. Maybe we should assure him a candidacy for a top post, and he will accomplish a bit more than Ciccolina ever has done, though it is felt by many that she is doing a very good job.
Right from the start, we see the incongruencies, which Fellini wants us to see about Rome. It is dirty, ugly, and the Italians take to the streets with a reckless abandon of dialogue, which can't be scripted, and is simply shot as is. As is costumary, the city life does not stop for the filming of this work, and life just seems to continue as if nothing had happened. And the television studio, which is sponsoring the massive program, makes sure that everyone in this large cattle call gets their two cents worth in. Amidst these 'fifteen minute'rs' are Ginger and Fred. And it is a good thing that there isn't a soccer match on television during the running of this show, because no one would have paid attention to the show at all, if it had. In the beginning of the film, when some of the characters are checking into the hotel, there is a major game, and the whole staff is more interested in the game than they are in the guests.
Amidst the life in the film of Fellini is his constant attack on the insensitivity of many people, and also their sexual proclivity which appears to run rampid. It is all a part of the Rome, most tourists might never have a chance to see. And when the dreamy qualities of the Ginger and Fred characters shine, the film literally stops, and the music starts up.
While it isn't as bombastic as FELLINI'S ROMA, or SATYRICON, or the works which were more extravagant and gave us a copy in KEN RUSSELL, it is still a nice movie to see. Despite the wonderful acting of both Masina and Mastroianni, this film plods along with many gags and digs at the film business, from its make up moments to the costuming moments, to just about any second during the production at the end. And of course, every dignitary is present, including the Mafioso that is being escorted by the police. And the new age gets ripped apart, with its idealistic look at things, rather than accept the reality of the moment.
Good Fellini film. Fun to watch, and would give you an idea how much many Hollywood films have influenced the television productions in Europe. The stage show would do Busby Berkeley very proud.
4 GIBLOONS Copyright (c) Pedro Sena 1994 Reviewer and Moderator of the CENTIPEDE's THE FILM.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews