- Copy
-
The XSUB-writer's interface to the C memcpy function. The src
is the source, dest is the destination, nitems is the number of
items, and type is the type. May fail on overlapping copies. See also Move.
void Copy(void* src, void* dest, int nitems, type)
|
|
- Move
-
The XSUB-writer's interface to the C memmove function. The src
is the source, dest is the destination, nitems is the number of
items, and type is the type. Can do overlapping moves. See also Copy.
void Move(void* src, void* dest, int nitems, type)
|
|
- New
-
The XSUB-writer's interface to the C malloc function.
void New(int id, void* ptr, int nitems, type)
|
|
- Newc
-
The XSUB-writer's interface to the C malloc function, with cast.
void Newc(int id, void* ptr, int nitems, type, cast)
|
|
- NEWSV
-
Creates a new SV. A non-zero len parameter indicates the number of bytes
of preallocated string space the SV should have. An extra byte for a tailing NUL is also
reserved. (SvPOK is not set for the SV even if string space is allocated.) The reference
count for the new SV is set to 1. id is an integer id between 0 and 1299
(used to identify leaks).
SV* NEWSV(int id, STRLEN len)
|
|
- Newz
-
The XSUB-writer's interface to the C malloc function. The allocated memory
is zeroed with memzero.
void Newz(int id, void* ptr, int nitems, type)
|
|
- Poison
-
Fill up memory with a pattern (byte 0xAB over and over again) that hopefully catches
attempts to access uninitialized memory.
void Poison(void* dest, int nitems, type)
|
|
- Renew
-
The XSUB-writer's interface to the C realloc function.
void Renew(void* ptr, int nitems, type)
|
|
- Renewc
-
The XSUB-writer's interface to the C realloc function, with cast.
void Renewc(void* ptr, int nitems, type, cast)
|
|
- Safefree
-
The XSUB-writer's interface to the C free function.
- savepv
-
Perl's version of strdup(). Returns a pointer to a newly allocated string
which is a duplicate of pv. The size of the string is determined by strlen().
The memory allocated for the new string can be freed with the Safefree()
function.
char* savepv(const char* pv)
|
|
- savepvn
-
Perl's version of what strndup() would be if it existed. Returns a pointer
to a newly allocated string which is a duplicate of the first len bytes from pv.
The memory allocated for the new string can be freed with the Safefree()
function.
char* savepvn(const char* pv, I32 len)
|
|
- savesharedpv
-
A version of savepv() which allocates the duplicate string in memory which
is shared between threads.
char* savesharedpv(const char* pv)
|
|
- StructCopy
-
This is an architecture-independent macro to copy one structure to another.
void StructCopy(type src, type dest, type)
|
|
- Zero
-
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.
void Zero(void* dest, int nitems, type)
|
|
|
|