++ed by:
ABRAXXA ADAMJS ALEXBIO ANDREFS ARJONES

118 PAUSE user(s)
93 non-PAUSE user(s).

Ricardo SIGNES

Handy Values

SV-Body Allocation

Memory Management

GV Functions

Hash Manipulation Functions

Lexer interface

Like "lex_stuff_pvn", but takes a literal string instead of a string/length pair.

Miscellaneous Functions

Character classes This section is about functions (really macros) that classify characters into types, such as punctuation versus alphabetic, etc. Most of these are analogous to regular expression character classes. (See "POSIX Character Classes" in perlrecharclass.) There are several variants for each class. (Not all macros have all variants; each item below lists the ones valid for it.) None are affected by use bytes, and only the ones with LC in the name are affected by the current locale.

The base function, e.g., isALPHA(), takes an octet (either a char or a U8) as input and returns a boolean as to whether or not the character represented by that octet is (or on non-ASCII platforms, corresponds to) an ASCII character in the named class based on platform, Unicode, and Perl rules. If the input is a number that doesn't fit in an octet, FALSE is returned.

Variant isFOO_A (e.g., isALPHA_A()) is identical to the base function with no suffix "_A".

Variant isFOO_L1 imposes the Latin-1 (or EBCDIC equivlalent) character set onto the platform. That is, the code points that are ASCII are unaffected, since ASCII is a subset of Latin-1. But the non-ASCII code points are treated as if they are Latin-1 characters. For example, isWORDCHAR_L1() will return true when called with the code point 0xDF, which is a word character in both ASCII and EBCDIC (though it represent different characters in each).

Variant isFOO_uni is like the isFOO_L1 variant, but accepts any UV code point as input. If the code point is larger than 255, Unicode rules are used to determine if it is in the character class. For example, isWORDCHAR_uni(0x100) returns TRUE, since 0x100 is LATIN CAPITAL LETTER A WITH MACRON in Unicode, and is a word character.

Variant isFOO_utf8 is like isFOO_uni, but the input is a pointer to a (known to be well-formed) UTF-8 encoded string (U8* or char*). The classification of just the first (possibly multi-byte) character in the string is tested.

Variant isFOO_LC is like the isFOO_A and isFOO_L1 variants, but uses the C library function that gives the named classification instead of hard-coded rules. For example, isDIGIT_LC() returns the result of calling isdigit(). This means that the result is based on the current locale, which is what LC in the name stands for. FALSE is always returned if the input won't fit into an octet.

Variant isFOO_LC_uvchr is like isFOO_LC, but is defined on any UV. It returns the same as isFOO_LC for input code points less than 256, and returns the hard-coded, not-affected-by-locale, Unicode results for larger ones.

Variant isFOO_LC_utf8 is like isFOO_LC_uvchr, but the input is a pointer to a (known to be well-formed) UTF-8 encoded string (U8* or char*). The classification of just the first (possibly multi-byte) character in the string is tested.

Miscellaneous Functions

Character case changing

Memory Management

In 5.9.3, Newx() and friends replace the older New() 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.

Like Copy but returns dest. Useful for encouraging compilers to tail-call optimise.

The XSUB-writer's interface to the C memzero function. The dest is the destination, nitems is the number of items, and type is the type.

Like Zero but returns dest. Useful for encouraging compilers to tail-call optimise.

Fill up memory with a byte pattern (a byte repeated over and over again) that hopefully catches attempts to access uninitialized memory.

PoisonWith(0xAB) for catching access to allocated but uninitialized memory.

PoisonWith(0xEF) for catching access to freed memory.

PoisonWith(0xEF) for catching access to freed memory.




Hosting generously
sponsored by Bytemark