view release on metacpan or search on metacpan
##cairo_rectangle_list_t * cairo_copy_clip_rectangle_list (cairo_t *cr);
void cairo_copy_clip_rectangle_list (cairo_t *cr)
PREINIT:
cairo_rectangle_list_t *list;
int i;
PPCODE:
list = cairo_copy_clip_rectangle_list (cr);
CAIRO_PERL_CHECK_STATUS (list->status);
EXTEND (sp, list->num_rectangles);
for (i = 0; i < list->num_rectangles; i++)
PUSHs (sv_2mortal (newSVCairoRectangle (&(list->rectangles[i]))));
## void cairo_get_dash (cairo_t *cr, double *dashes, double *offset);
void cairo_get_dash (cairo_t *cr)
PREINIT:
int count, i;
double *dashes, offset;
PPCODE:
count = cairo_get_dash_count (cr);
if (count == 0) {
dashes = NULL;
} else {
New (0, dashes, count, double);
view all matches for this distribution
view release on metacpan or search on metacpan
RETVAL
void
list_calendars(service=0)
char * service
PPCODE:
{
CSA_calendar_user *result;
CSA_uint32 number;
int err,i;
SV ** s;
void
look_up(session, users, flags=0)
Calendar::CSA::Session session
SV * users
SV * flags
PPCODE:
{
CSA_calendar_user user, *result;
CSA_uint32 number;
int err,i;
void
query_configuration(session, item)
Calendar::CSA::Session session
SV * item
PPCODE:
{
CSA_calendar_user user, *result;
CSA_uint32 number;
int err=0,i;
i = SvOpt(item, "configuration item", configs);
}
void
list_calendar_attributes(session)
Calendar::CSA::Session session
PPCODE:
{
CSA_attribute_reference *result;
CSA_uint32 number;
int err,i;
SV ** s;
}
void
read_calendar_attributes(session, ...)
Calendar::CSA::Session session
PPCODE:
{
int i, j, err;
int flags=0;
CSA_uint32 count;
CSA_attribute * result;
void
read_next_reminder(session, given_time, ...)
Calendar::CSA::Session session
SV * given_time
PPCODE:
{
int i, j, err;
int flags=0;
CSA_uint32 count;
CSA_reminder_reference * result;
free_time_search(session, range, duration, calendar,...)
Calendar::CSA::Session session
SV * range
SV * duration
SV * calendar
PPCODE:
{
int i, j, err;
CSA_uint32 count;
CSA_free_time * result;
CSA_calendar_user * csa_users;
RETVAL
void
list_entries(session, ...)
Calendar::CSA::Session session
PPCODE:
{
int i, j=0, err;
int flags=0;
CSA_uint32 count;
CSA_entry_handle *new_entries;
entrylist->list = 0;
AV *
entries(entrylist)
Calendar::CSA::EntryList entrylist
PPCODE:
{
int i;
Calendar__CSA__Entry entry;
SV *result;
}
void
read_entry_attributes(entry, ...)
Calendar::CSA::Entry entry
PPCODE:
{
int i, j, err;
CSA_uint32 count;
CSA_attribute * result;
CSA_attribute_reference * csa_names;
void
list_entry_sequence(entry, range=&sv_undef, ...)
Calendar::CSA::Entry entry
SV * range
PPCODE:
{
int i, j, err;
int flags=0;
CSA_uint32 count;
CSA_attribute * result;
view all matches for this distribution
view release on metacpan or search on metacpan
Capstone.xs view on Meta::CPAN
PREINIT:
size_t ret, i;
HV *hash;
cs_insn *insn;
PPCODE:
if(SvTYPE(code) != SVt_PV) {
croak("<code> argument not an array scalar");
}
ret = cs_disasm(*handle, SvPVbyte(code, SvCUR(code)), SvCUR(code), address, count, &insn);
Capstone.xs view on Meta::CPAN
version()
PREINIT:
int major, minor;
PPCODE:
cs_version(&major, &minor);
EXTEND(SP, 2);
XST_mIV(0, major);
XST_mIV(1, minor);
view all matches for this distribution
view release on metacpan or search on metacpan
const-xs.inc view on Meta::CPAN
/* NV nv; Uncomment this if you need to return NVs */
/* const char *pv; Uncomment this if you need to return PVs */
INPUT:
SV * sv;
const char * s = SvPV(sv, len);
PPCODE:
type = constant(aTHX_ s, len);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
switch (type) {
case PERL_constant_NOTFOUND:
view all matches for this distribution
view release on metacpan or search on metacpan
void
unpack_metadata(protocol_version, is_result, data)
int protocol_version
int is_result
SV *data
PPCODE:
STRLEN pos, size;
unsigned char *ptr;
int32_t flags, column_count, uniq_column_count;
Cassandra__Client__RowMeta *row_meta;
view all matches for this distribution
view release on metacpan or search on metacpan
const char * soid
PREINIT:
size_t psize;
time_t pmtime;
int err;
PPCODE:
err = rados_striper_stat(striper, soid, &psize, &pmtime);
if (err < 0)
croak("cannot stat object '%s': %s", soid, strerror(-err));
XPUSHs(sv_2mortal(newSVuv(psize)));
XPUSHs(sv_2mortal(newSVuv(pmtime)));
view all matches for this distribution
view release on metacpan or search on metacpan
const char * oid
PREINIT:
size_t size;
time_t mtime;
int err;
PPCODE:
err = rados_stat(io, oid, &size, &mtime);
if (err < 0)
croak("cannot stat object '%s': %s", oid, strerror(-err));
XPUSHs(sv_2mortal(newSVuv(size)));
XPUSHs(sv_2mortal(newSVuv(mtime)));
view all matches for this distribution
view release on metacpan or search on metacpan
xs/Champlain.xs view on Meta::CPAN
RETVAL
void
GET_VERSION_INFO (class)
PPCODE:
EXTEND (SP, 3);
PUSHs (sv_2mortal (newSViv (CHAMPLAIN_MAJOR_VERSION)));
PUSHs (sv_2mortal (newSViv (CHAMPLAIN_MINOR_VERSION)));
PUSHs (sv_2mortal (newSViv (CHAMPLAIN_MICRO_VERSION)));
PERL_UNUSED_VAR (ax);
view all matches for this distribution
view release on metacpan or search on metacpan
void
_match_route(self, path_sv)
SV *self
SV *path_sv
PPCODE:
{
HV *hv = (HV *)SvRV(self);
SV **routes_svp = hv_fetchs(hv, "_routes", 0);
const char *path;
STRLEN path_len;
# ---- windows() - return all child windows ----
void
windows(self)
SV *self
PPCODE:
{
HV *hv = (HV *)SvRV(self);
SV **arr_svp = hv_fetchs(hv, "_windows", 0);
if (arr_svp && SvROK(*arr_svp)) {
void
extend_bridge(self, name, source, ...)
SV *self
const char *name
const char *source
PPCODE:
{
char **deps = NULL;
int dep_count = 0;
int i;
view all matches for this distribution
view release on metacpan or search on metacpan
GlobalPhase.xs view on Meta::CPAN
in_global_phase_check = 2
in_global_phase_init = 3
in_global_phase_run = 4
in_global_phase_end = 5
in_global_phase_destruct = 6
PPCODE:
{
/* using ix when we can -- probably most/all versions? */
#if CAN_USE_IX_FOR_PERL_PHASE
int phase = ix;
#else
GlobalPhase.xs view on Meta::CPAN
}
}
SV*
current_phase()
PPCODE:
{
XPUSHs(newSViv(PL_phase));
}
BOOT:
view all matches for this distribution
view release on metacpan or search on metacpan
MolecularMass/MolecularMass.xs view on Meta::CPAN
void
parse_formula(s)
char *s;
PREINIT:
Atom_count *i;
PPCODE:
i = parse_formula_c(s);
if(i == NULL)
{
/* do push nothing on the stack --
view all matches for this distribution
view release on metacpan or search on metacpan
int res; /* Numeric ctapi call result */
/*
int i;
*/
PPCODE:
/* automatic response length handling */
if (rsplen == 0) {
rsplen = 255;
}
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
DWORD nBufferSize = 0;
char* szBuffer = NULL;
char* szCurrentToken = NULL;
char* mszGroups;
PPCODE:
/* Before doing anything, we check that we have a valid group. */
if (SvPOK(svGroups)) {
/* TODO : see how this works... multistring stuff with time
*svGroups may become a reference to an array of groups... or undef
*/
unsigned long dwShareMode
unsigned long dwPreferredProtocols
PREINIT:
SCARDHANDLE hCard = 0;
DWORD dwActiveProtocol = 0;
PPCODE:
gnLastError = hConnect (hContext, szReader, dwShareMode, dwPreferredProtocols, &hCard, &dwActiveProtocol);
/* We return immediately in case of an error */
if (gnLastError != SCARD_S_SUCCESS)
XSRETURN_UNDEF;
DWORD cbAtrLen = 0;
#endif
DWORD dwState = 0;
DWORD dwProtocol = 0;
AV* aATR = 0;
PPCODE:
/* We call the function with a null cchReaderLen : this should
* gives us the length of the buffer to allocate
*/
gnLastError = hStatus (hCard, szReaderName, &cchReaderLen,
&dwState, &dwProtocol, (BYTE *)pbAtr, &cbAtrLen);
static unsigned char pbRecvBuffer [MAX_BUFFER_SIZE_EXTENDED];
unsigned long cbSendLength = 0;
DWORD cbRecvLength = sizeof (pbRecvBuffer);
SCARD_IO_REQUEST ioSendPci, ioRecvPci;
AV* aRecvBuffer = NULL;
PPCODE:
/* We make sure that the array is sane */
if (psvSendData == NULL) {
gnLastError = SCARD_E_INVALID_PARAMETER;
warn ("psvSendData is a NULL pointer at %s line %d\n\t",
__FILE__, __LINE__);
static char* pbSendBuffer = NULL;
static unsigned char pbRecvBuffer [MAX_BUFFER_SIZE];
unsigned long cbSendLength = 0;
DWORD cbRecvLength = sizeof (pbRecvBuffer);
AV* aRecvBuffer = NULL;
PPCODE:
/* We make sure that the array is sane */
if (psvSendData == NULL) {
gnLastError = SCARD_E_INVALID_PARAMETER;
warn ("psvSendData is a NULL pointer at %s line %d\n\t",
__FILE__, __LINE__);
unsigned int nCount = 0;
unsigned int nATRCount = 0;
unsigned int nReaders = 0;
AV* aRecvBuffer = NULL;
PPCODE:
if (psvReaderStates == NULL) {
gnLastError = SCARD_E_INVALID_PARAMETER;
warn ("psvReaderStates is a NULL pointer at %s line %d\n\t",
__FILE__, __LINE__);
XSRETURN_NO;
view all matches for this distribution
view release on metacpan or search on metacpan
xs/Cursor.xs view on Meta::CPAN
INIT:
CXFile file;
const char *filename;
unsigned int line, line_end, col, col_end, offset;
PPCODE:
CXSourceLocation loc = clang_getCursorLocation(*self);
CXSourceRange range = clang_getCursorExtent(*self);
CXSourceLocation end = clang_getRangeEnd(range);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Accessor/Fast/GXS.pm view on Meta::CPAN
__xs_$name(self)
SV* self;
PROTOTYPE: DISABLE
INIT:
SV** res;
PPCODE:
res = hv_fetch((HV *)SvRV(self), "$field", $length, 0);
if (res == NULL)
XSRETURN_UNDEF;
XPUSHs(*res);
lib/Class/Accessor/Fast/GXS.pm view on Meta::CPAN
PROTOTYPE: DISABLE
INIT:
SV **res;
SV *newvalue;
IV i;
PPCODE:
if ( items == 2 ) {
newvalue = SvREFCNT_inc(ST(1));
} else if ( items > 2 ) {
AV* tmp = newAV();
av_extend(tmp, items-1);
lib/Class/Accessor/Fast/GXS.pm view on Meta::CPAN
PROTOTYPE: DISABLE
INIT:
SV **res;
SV *newvalue;
IV i;
PPCODE:
if ( items == 1 ) {
res = hv_fetch((HV *)SvRV(self), "$field", $length, 0);
if (res == NULL)
XSRETURN_UNDEF;
view all matches for this distribution
view release on metacpan or search on metacpan
/* Get the const hash key struct from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const autoxs_hashkey readfrom = AutoXS_hashkeys[ix];
HE* he;
PPCODE:
if ( items > 1 )
croak("cannot alter readonly value");
if ( he = hv_fetch_ent((HV *)SvRV(self), readfrom.key, 0, readfrom.hash) )
PUSHs(HeVAL(he));
* We uses it to identify the currently running alias of the accessor. Gollum! */
HE *res;
SV *newvalue;
IV i;
const autoxs_hashkey readfrom = AutoXS_hashkeys[ix];
PPCODE:
if ( items == 2 ) {
newvalue = newSVsv(ST(1));
} else if ( items > 2 ) {
AV* tmp = newAV();
av_extend(tmp, items-1);
IV i;
/* Get the const hash key struct from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const autoxs_hashkey readfrom = AutoXS_hashkeys[ix];
PPCODE:
if ( items == 1 ) {
res = hv_fetch_ent((HV *)SvRV(self), readfrom.key, 0, readfrom.hash);
if (res == NULL)
XSRETURN_UNDEF;
char* name;
char* key;
INIT:
autoxs_hashkey hashkey;
unsigned int len;
PPCODE:
char* file = __FILE__;
const unsigned int functionIndex = get_next_hashkey();
{
CV * cv;
/* This code is very similar to what you get from using the ALIAS XS syntax.
char* name;
char* key;
INIT:
autoxs_hashkey hashkey;
unsigned int len;
PPCODE:
char* file = __FILE__;
const unsigned int functionIndex = get_next_hashkey();
{
CV * cv;
/* This code is very similar to what you get from using the ALIAS XS syntax.
char* name;
char* key;
INIT:
autoxs_hashkey hashkey;
unsigned int len;
PPCODE:
char* file = __FILE__;
const unsigned int functionIndex = get_next_hashkey();
{
CV * cv;
/* This code is very similar to what you get from using the ALIAS XS syntax.
view all matches for this distribution
view release on metacpan or search on metacpan
newCONSTSUB(stash, "OPTIMIZED_OPMETHOD", CAIX_OPTIMIZE_OPMETHOD_RESULT);
}
void
install_object_accessor(SV* full_name, SV* hash_key, int opts)
PPCODE:
{
CAIXS_install_inherited_accessor(aTHX_ full_name, hash_key, NULL, NULL, NULL, opts);
XSRETURN_UNDEF;
}
void
install_inherited_accessor(SV* full_name, SV* hash_key, SV* pkg_key, int opts)
PPCODE:
{
CAIXS_install_inherited_accessor(aTHX_ full_name, hash_key, pkg_key, NULL, NULL, opts);
XSRETURN_UNDEF;
}
void
install_inherited_cb_accessor(SV* full_name, SV* hash_key, SV* pkg_key, SV* read_cb, SV* write_cb, int opts)
PPCODE:
{
CAIXS_install_inherited_accessor(aTHX_ full_name, hash_key, pkg_key, read_cb, write_cb, opts);
XSRETURN_UNDEF;
}
void
install_class_accessor(SV* full_name, SV* default_sv, SV* is_varclass, SV* opts)
PPCODE:
{
CAIXS_install_class_accessor(aTHX_ full_name, default_sv, SvTRUE(is_varclass), SvIV(opts));
XSRETURN_UNDEF;
}
void
install_constructor(SV* full_name)
PPCODE:
{
CAIXS_install_cv<Constructor, None>(aTHX_ full_name);
XSRETURN_UNDEF;
}
MODULE = Class::Accessor::Inherited::XS PACKAGE = Class::Accessor::Inherited::XS::Debug
PROTOTYPES: DISABLE
void unstolen_count()
PPCODE:
{
XSRETURN_IV(unstolen);
}
view all matches for this distribution
view release on metacpan or search on metacpan
docs/Developer/Dumper.xs view on Meta::CPAN
void
AutoDB_Dumper_Dumpxs(href, ...)
SV *href;
PROTOTYPE: $;$$
PPCODE:
{
HV *hv;
SV *retval, *valstr;
HV *seenhv = NULL;
AV *postav, *todumpav, *namesav;
view all matches for this distribution
view release on metacpan or search on metacpan
get_coderef_info(coderef)
SV* coderef
PREINIT:
char* name;
char* pkg;
PPCODE:
if (SvOK(coderef) && SvROK(coderef) && SvTYPE(SvRV(coderef)) == SVt_PVCV) {
coderef = SvRV(coderef);
if (CvGV(coderef)) {
name = GvNAME( CvGV(coderef) );
pkg = HvNAME( GvSTASH(CvGV(coderef)) );
view all matches for this distribution
view release on metacpan or search on metacpan
SV *klass
HV *options
PREINIT:
HV *stash;
bool found_method = FALSE;
PPCODE:
SvGETMAGIC(klass);
if (!(SvPOKp(klass) && SvCUR(klass))) { /* XXX: SvPOK does not work with magical scalars */
XSRETURN_NO;
}
view all matches for this distribution
view release on metacpan or search on metacpan
MethodCache.xs view on Meta::CPAN
get_cached_method (sv)
INPUT:
SV *sv
PREINIT:
GV *gv = sv_gv(sv);
PPCODE:
if ( GvCV(gv) && GvCVGEN(gv) == HvCURGEN(GvSTASH(gv)) )
XPUSHs(sv_2mortal(newRV_inc((SV *)GvCV(gv))));
else
XPUSHs(&PL_sv_undef);
MethodCache.xs view on Meta::CPAN
get_cv (sv)
INPUT:
SV *sv
PREINIT:
GV *gv = sv_gv(sv);
PPCODE:
if ( GvCV(gv) )
XPUSHs(sv_2mortal(newRV_inc((SV *)GvCV(gv))));
else
XPUSHs(&PL_sv_undef);
MethodCache.xs view on Meta::CPAN
SV *sv
SV *cv_sv
PREINIT:
CV *cv;
GV *gv = sv_gv(sv);
PPCODE:
if ( !SvOK(cv_sv) ) {
cv = NULL;
} else if ( SvROK(cv_sv) && SvTYPE(SvRV(cv_sv)) == SVt_PVCV ) {
cv = (CV *)SvRV(cv_sv);
SvREFCNT_inc(cv);
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
HV* vars;
struct tnode * syntax_tree;
SV* buffer;
char log_message[256];
PPCODE:
/* check that the reference we got is a real reference */
if (!SvROK(hash_ref)) {
vars = newHV();
}
else if ( SvTYPE( SvRV( hash_ref ) ) != SVt_PVHV) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Class/Std/Fast_XS.xs view on Meta::CPAN
* We uses it to identify the currently running alias of the accessor. Gollum! */
const autoxs_hashkey readfrom = AutoXS_hashkeys[ix];
HE* he;
HE* value_ent;
SV* key;
PPCODE:
if (he = hv_fetch_ent(global_hash_ref, readfrom.key, 0, readfrom.hash)) {
if (value_ent = hv_fetch_ent((HV*)SvRV(HeVAL(he)), SvRV(self), 0, 0)) {
XPUSHs(HeVAL(value_ent));
}
else {
lib/Class/Std/Fast_XS.xs view on Meta::CPAN
* We uses it to identify the currently running alias of the accessor. Gollum! */
const autoxs_hashkey readfrom = AutoXS_hashkeys[ix];
HE* he;
SV* key;
PPCODE:
SvREFCNT_inc(newvalue);
if (he = hv_fetch_ent(global_hash_ref, readfrom.key, 0, readfrom.hash)) {
key = SvRV(self);
if (NULL == hv_store_ent((HV*)SvRV(HeVAL(he)), key, newvalue, 0)) {
croak("Failed to write new value to hash.");
lib/Class/Std/Fast_XS.xs view on Meta::CPAN
void
newxs_getter(name, key)
char* name;
char* key;
PPCODE:
char* file = __FILE__;
const unsigned int functionIndex = get_next_hashkey();
{
CV * cv;
unsigned int len;
lib/Class/Std/Fast_XS.xs view on Meta::CPAN
void
newxs_setter(name, key)
char* name;
char* key;
PPCODE:
char* file = __FILE__;
const unsigned int functionIndex = get_next_hashkey();
{
CV * cv;
unsigned int len;
view all matches for this distribution
view release on metacpan or search on metacpan
XS/Array.xs view on Meta::CPAN
/* Get the array index from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
SV** svp;
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(getter);
if ((svp = av_fetch((AV *)SvRV(self), index, 1)))
PUSHs(svp[0]);
else
XS/Array.xs view on Meta::CPAN
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
SV** svp;
SV* sv;
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(lvalue_accessor);
if ((svp = av_fetch((AV *)SvRV(self), index, 1))) {
sv = *svp;
sv_upgrade(sv, SVt_PVLV);
XS/Array.xs view on Meta::CPAN
INIT:
/* Get the array index from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(setter);
if (NULL == av_store((AV*)SvRV(self), index, newSVsv(newvalue)))
croak("Failed to write new value to array.");
PUSHs(newvalue);
XS/Array.xs view on Meta::CPAN
INIT:
/* Get the array index from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(chained_setter);
if (NULL == av_store((AV*)SvRV(self), index, newSVsv(newvalue)))
croak("Failed to write new value to array.");
PUSHs(self);
XS/Array.xs view on Meta::CPAN
/* Get the array index from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
SV** svp;
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(accessor);
if (items > 1) {
SV* newvalue = ST(1);
if (NULL == av_store((AV*)SvRV(self), index, newSVsv(newvalue)))
XS/Array.xs view on Meta::CPAN
/* Get the array index from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
SV** svp;
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(chained_accessor);
if (items > 1) {
SV* newvalue = ST(1);
if (NULL == av_store((AV*)SvRV(self), index, newSVsv(newvalue)))
XS/Array.xs view on Meta::CPAN
/* Get the array index from the global storage */
/* ix is the magic integer variable that is set by the perl guts for us.
* We uses it to identify the currently running alias of the accessor. Gollum! */
const I32 index = CXSAccessor_arrayindices[ix];
SV** svp;
PPCODE:
CXA_CHECK_ARRAY(self);
CXAA_OPTIMIZE_ENTERSUB(predicate);
if ( (svp = av_fetch((AV *)SvRV(self), index, 1)) && SvOK(svp[0]) )
XSRETURN_YES;
else
XS/Array.xs view on Meta::CPAN
SV* class;
PREINIT:
AV* array;
SV* obj;
const char* classname;
PPCODE:
CXAA_OPTIMIZE_ENTERSUB(constructor);
classname = SvROK(class) ? sv_reftype(SvRV(class), 1) : SvPV_nolen_const(class);
array = newAV();
obj = sv_bless( newRV_noinc((SV*)array), gv_stashpv(classname, 1) );
XS/Array.xs view on Meta::CPAN
Class::XSAccessor::Array::newxs_lvalue_accessor = 1
Class::XSAccessor::Array::newxs_predicate = 2
PREINIT:
char *name;
STRLEN namelen;
PPCODE:
name = SvPV(namesv, namelen);
switch (ix) {
case 0: /* newxs_getter */
INSTALL_NEW_CV_ARRAY_OBJ(name, CXAA(getter), index);
break;
XS/Array.xs view on Meta::CPAN
ALIAS:
Class::XSAccessor::Array::newxs_accessor = 1
PREINIT:
char *name;
STRLEN namelen;
PPCODE:
name = SvPV(namesv, namelen);
if (ix == 0) { /* newxs_setter */
if (chained)
INSTALL_NEW_CV_ARRAY_OBJ(name, CXAA(chained_setter), index);
else
XS/Array.xs view on Meta::CPAN
newxs_constructor(namesv)
SV *namesv;
PREINIT:
char *name;
STRLEN namelen;
PPCODE:
name = SvPV(namesv, namelen);
INSTALL_NEW_CV(name, CXAA(constructor));
view all matches for this distribution
view release on metacpan or search on metacpan
XSConstructor.xs view on Meta::CPAN
int depth
PREINIT:
SV *clone = &PL_sv_undef;
HV *hseen = newHV();
AV *weakrefs = newAV();
PPCODE:
TRACEME(("ref = 0x%x\n", self));
clone = sv_clone( aTHX_ self, hseen, depth, 0, weakrefs );
/* Now apply deferred weakening.
* All strong references in the clone graph are established,
* so it is safe to weaken references without destroying referents. */
view all matches for this distribution
view release on metacpan or search on metacpan
# wider than 64 bits.
void
unpack_varint(bytes, offset)
SV *bytes
UV offset
PPCODE:
{
STRLEN len;
const unsigned char *p = (const unsigned char *)SvPVbyte(bytes, len);
UV v = tcp_read_varint(aTHX_ p, (UV)len, &offset);
EXTEND(SP, 2);
# decides UTF-8 vs binary).
void
unpack_string(bytes, offset)
SV *bytes
UV offset
PPCODE:
{
STRLEN buf_len;
const unsigned char *p = (const unsigned char *)SvPVbyte(bytes, buf_len);
UV slen = tcp_read_varint(aTHX_ p, (UV)buf_len, &offset);
/* Subtraction form: addition (offset + slen) can wrap UV_MAX when
view all matches for this distribution
view release on metacpan or search on metacpan
AsUTF8Bytes.xs view on Meta::CPAN
SV *self
int depth
PREINIT:
SV *clone = &PL_sv_undef;
HV *hseen = newHV();
PPCODE:
TRACEME(("ref = 0x%x\n", self));
clone = sv_clone(self, hseen, depth);
hv_clear(hseen); /* Free HV */
SvREFCNT_dec((SV *)hseen);
EXTEND(SP,1);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Clone/Closure.xs view on Meta::CPAN
PROTOTYPES: ENABLE
void
_breakpoint()
PPCODE:
XSRETURN_UNDEF;
void
clone(ref)
SV *ref
PREINIT:
SV *clone;
HV *SEEN;
PPCODE:
SEEN = newHV();
TRACE_SV("ref", "clone", ref);
clone = sv_clone(SEEN, ref);
TRACE_SV("clone", "clone", clone);
view all matches for this distribution
view release on metacpan or search on metacpan
int depth
PREINIT:
SV *clone = &PL_sv_undef;
HV *hseen = newHV();
AV *weakrefs = newAV();
PPCODE:
TRACEME(("ref = 0x%x\n", self));
clone = sv_clone(self, hseen, depth, 0, weakrefs);
/* Now apply deferred weakening (GH #15).
* All strong references in the clone graph are established,
* so it is safe to weaken references without destroying referents. */
view all matches for this distribution
view release on metacpan or search on metacpan
buildlib/Clownfish/Build/Binding.pm view on Meta::CPAN
OUTPUT: RETVAL
void
invoke_to_string(obj)
cfish_Obj *obj;
PPCODE:
cfish_String *str = CFISH_Obj_To_String(obj);
CFISH_DECREF(str);
int
refcount(obj)
buildlib/Clownfish/Build/Binding.pm view on Meta::CPAN
void
store(self, key, value_sv);
cfish_Hash *self;
cfish_String *key;
SV *value_sv;
PPCODE:
{
cfish_Obj *value
= (cfish_Obj*)XSBind_perl_to_cfish_nullable(aTHX_ value_sv, CFISH_OBJ);
CFISH_Hash_Store(self, key, value);
}
buildlib/Clownfish/Build/Binding.pm view on Meta::CPAN
void
store(self, tick, value);
cfish_Vector *self;
uint32_t tick;
cfish_Obj *value;
PPCODE:
{
if (value) { CFISH_INCREF(value); }
CFISH_Vec_Store(self, tick, value);
}
view all matches for this distribution