view release on metacpan or search on metacpan
fallback/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:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution
view release on metacpan or search on metacpan
OUTPUT:
RETVAL
void
compare (GdkPixbuf *a, GdkPixbuf *b)
PPCODE:
perlinterp_release ();
{
int w = gdk_pixbuf_get_width (a);
int h = gdk_pixbuf_get_height (a);
view all matches for this distribution
view release on metacpan or search on metacpan
xs/GdkGLQuery.xs view on Meta::CPAN
void
gdk_gl_query_version (class)
PREINIT:
int major;
int minor;
PPCODE:
gdk_gl_query_version(&major, &minor);
EXTEND (SP, 2);
PUSHs (sv_2mortal (newSViv (major)));
PUSHs (sv_2mortal (newSViv (minor)));
PERL_UNUSED_VAR (ax);
view all matches for this distribution
view release on metacpan or search on metacpan
GladeXML.xs view on Meta::CPAN
GladeXML *self
const char *name
PREINIT:
GList * widgets = NULL;
GList * i = NULL;
PPCODE:
widgets = glade_xml_get_widget_prefix(self, name);
if( !widgets )
XSRETURN_EMPTY;
for( i = widgets; i != NULL; i = i->next )
XPUSHs(sv_2mortal(newSVGtkWidget(i->data)));
view all matches for this distribution
view release on metacpan or search on metacpan
ImageView.xs view on Meta::CPAN
gtk_image_view_get_check_colors (view)
GtkImageView * view
PREINIT:
int check_color1;
int check_color2;
PPCODE:
gtk_image_view_get_check_colors (view, &check_color1, &check_color2);
XPUSHs(sv_2mortal(newSViv(check_color1)));
XPUSHs(sv_2mortal(newSViv(check_color2)));
view all matches for this distribution
view release on metacpan or search on metacpan
xs/Notify.xs view on Meta::CPAN
void
notify_get_server_caps (class)
PREINIT:
GList *list, *tmp;
PPCODE:
list = notify_get_server_caps ();
for (tmp = list; tmp != NULL; tmp = tmp->next) {
XPUSHs (sv_2mortal (newSVGChar (tmp->data)));
}
g_list_free (list);
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/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:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution
view release on metacpan or search on metacpan
xs/RecentItem.xs view on Meta::CPAN
void
egg_recent_item_get_groups (item)
const EggRecentItem *item
PREINIT:
GList *i, *groups;
PPCODE:
groups = (GList *) egg_recent_item_get_groups (item);
for (i = groups; i != NULL; i = i->next)
XPUSHs (sv_2mortal (newSVGChar (i->data)));
gboolean
view all matches for this distribution
view release on metacpan or search on metacpan
xs/SexySpellEntry.xs view on Meta::CPAN
void
sexy_spell_entry_get_languages (entry)
const SexySpellEntry *entry
PREINIT:
GSList *list = NULL, *cur;
PPCODE:
list = sexy_spell_entry_get_languages (entry);
if (!list) {
XSRETURN_EMPTY;
}
xs/SexySpellEntry.xs view on Meta::CPAN
void
sexy_spell_entry_get_active_languages (entry)
SexySpellEntry *entry
PREINIT:
GSList *list = NULL, *cur;
PPCODE:
list = sexy_spell_entry_get_active_languages (entry);
if (!list) {
XSRETURN_EMPTY;
}
view all matches for this distribution
view release on metacpan or search on metacpan
xs/GtkSourceBuffer.xs view on Meta::CPAN
##gtk_source_buffer_get_markers_in_region (GtkSourceBuffer *buffer, const GtkTextIter *begin, const GtkTextIter *end);
void
gtk_source_buffer_get_markers_in_region (GtkSourceBuffer *buffer, const GtkTextIter *begin, const GtkTextIter *end)
PREINIT:
GSList * markers, * i;
PPCODE:
markers = gtk_source_buffer_get_markers_in_region (buffer, begin, end);
for (i = markers ; i != NULL ; i = i->next)
XPUSHs (sv_2mortal (newSVGtkSourceMarker
(GTK_SOURCE_MARKER (i->data))));
g_slist_free (markers);
view all matches for this distribution
view release on metacpan or search on metacpan
xs/GtkSourceBuffer.xs view on Meta::CPAN
void
gtk_source_buffer_get_source_marks_at_iter (GtkSourceBuffer *buffer, GtkTextIter *iter, const gchar_ornull *category)
PREINIT:
GSList *list = NULL;
PPCODE:
list = gtk_source_buffer_get_source_marks_at_iter(buffer, iter, category);
sourceview2perl_return_gslist(list);
void
gtk_source_buffer_get_source_marks_at_line (GtkSourceBuffer *buffer, gint line, const gchar_ornull *category)
PREINIT:
GSList *list = NULL;
PPCODE:
list = gtk_source_buffer_get_source_marks_at_line(buffer, line, category);
sourceview2perl_return_gslist(list);
void
gtk_source_buffer_remove_source_marks (GtkSourceBuffer *buffer, const GtkTextIter *start, const GtkTextIter *end, const gchar_ornull *category)
view all matches for this distribution
view release on metacpan or search on metacpan
xs/Unique.xs view on Meta::CPAN
RETVAL
void
GET_VERSION_INFO (class)
PPCODE:
EXTEND (SP, 3);
PUSHs (sv_2mortal (newSViv (UNIQUE_MAJOR_VERSION)));
PUSHs (sv_2mortal (newSViv (UNIQUE_MINOR_VERSION)));
PUSHs (sv_2mortal (newSViv (UNIQUE_MICRO_VERSION)));
PERL_UNUSED_VAR (ax);
view all matches for this distribution
view release on metacpan or search on metacpan
xs/WebKitSecurityOrigin.xs view on Meta::CPAN
void
webkit_security_origin_get_all_web_databases (security_origin)
WebKitSecurityOrigin *security_origin
PREINIT:
GList *databases, *i;
PPCODE:
databases = webkit_security_origin_get_all_web_databases (security_origin);
for (i = databases; i; i = i->next) {
XPUSHs (newSVWebKitWebDatabase (i->data));
}
view all matches for this distribution
view release on metacpan or search on metacpan
RandomAccess.xs view on Meta::CPAN
RETVAL
void
build_index(self)
Gzip::RandomAccess self
PPCODE:
zran_build_index(self->zran, self->index_span, NULL);
SV *
extract(self, offset, length)
Gzip::RandomAccess self
RandomAccess.xs view on Meta::CPAN
RETVAL
void
_free(self)
Gzip::RandomAccess self
PPCODE:
zran_cleanup(self->zran);
free(self);
view all matches for this distribution
view release on metacpan or search on metacpan
embperl_GetPackageOfFile(sSourcefile, sPackage, mtime, bEP1Compat)
char * sSourcefile
char * sPackage
double mtime
int bEP1Compat
PPCODE:
tFile * pFile = GetFileData (sSourcefile, sPackage, mtime, bEP1Compat) ;
EXTEND(SP,2) ;
PUSHs(sv_2mortal(newSViv(pFile -> mtime == -1?1:0))) ;
PUSHs(sv_2mortal(newSVpv(pFile -> sCurrPackage, pFile -> nCurrPackage))) ;
view all matches for this distribution
view release on metacpan or search on metacpan
parse(self, chunk)
SV* self;
SV* chunk
PREINIT:
PSTATE* p_state = get_pstate_hv(aTHX_ self);
PPCODE:
(void)sv_2mortal(SvREFCNT_inc(SvRV(self)));
if (p_state->parsing)
croak("Parse loop not allowed");
p_state->parsing = 1;
if (SvROK(chunk) && SvTYPE(SvRV(chunk)) == SVt_PVCV) {
void
eof(self)
SV* self;
PREINIT:
PSTATE* p_state = get_pstate_hv(aTHX_ self);
PPCODE:
if (p_state->parsing)
p_state->eof = 1;
else {
p_state->parsing = 1;
parse(aTHX_ p_state, 0, self); /* flush */
STRLEN name_len;
char *name = SvPV(eventname, name_len);
int event = -1;
int i;
struct p_handler *h;
PPCODE:
/* map event name string to event_id */
for (i = 0; i < EVENT_COUNT; i++) {
if (strEQ(name, event_id_str[i])) {
event = i;
break;
void
decode_entities(...)
PREINIT:
int i;
HV *entity2char = get_hv("HTML::Entities::entity2char", 0);
PPCODE:
if (GIMME_V == G_SCALAR && items > 1)
items = 1;
for (i = 0; i < items; i++) {
if (GIMME_V != G_VOID)
ST(i) = sv_2mortal(newSVsv(ST(i)));
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
TidyBuffer errbuf = {0};
TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
const char* newline;
int rc = 0;
PPCODE:
tidyBufInit(&errbuf);
rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );
if ( (rc >= 0 ) && configfile && *configfile ) {
rc = tidyLoadConfig( tdoc, configfile );
TidyBuffer errbuf = {0};
TidyBuffer output = {0};
TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
const char* newline;
int rc = 0;
PPCODE:
tidyBufInit(&output);
tidyBufInit(&errbuf);
/* Set our default first. */
/* Don't word-wrap */
rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );
view all matches for this distribution
view release on metacpan or search on metacpan
TagReader.xs view on Meta::CPAN
PREINIT:
int bufpos;
char ch;
char chn;
int state;
PPCODE:
if (! self->fileline){
croak("Object not initialized");
}
/* initialize */
state=0;
TagReader.xs view on Meta::CPAN
char ch;
char chn; /* next character */
int typepos;
int typeposdone;
int state;
PPCODE:
if (! self->fileline){
croak("Object not initialized");
}
/* initialize */
state=0;
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
TidyBuffer errbuf = {0};
TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
const char* newline;
int rc = 0;
PPCODE:
tidyBufInit(&errbuf);
rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );
if ( (rc >= 0 ) && configfile && *configfile ) {
rc = tidyLoadConfig( tdoc, configfile );
TidyBuffer errbuf = {0};
TidyBuffer output = {0};
TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
const char* newline;
int rc = 0;
PPCODE:
tidyBufInit(&output);
tidyBufInit(&errbuf);
/* Set our default first. */
/* Don't word-wrap */
rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );
view all matches for this distribution
view release on metacpan or search on metacpan
PREINIT:
TidyBuffer errbuf = {0};
TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
const char* newline;
int rc = 0;
PPCODE:
tidyBufInit(&errbuf);
rc = ( tidyOptSetValue( tdoc, TidyCharEncoding, "utf8" ) ? rc : -1 );
if ( (rc >= 0 ) && configfile && *configfile ) {
rc = tidyLoadConfig( tdoc, configfile );
TidyBuffer errbuf = {0};
TidyBuffer output = {0};
TidyDoc tdoc = tidyCreate(); /* Initialize "document" */
const char* newline;
int rc = 0;
PPCODE:
tidyBufInit(&output);
tidyBufInit(&errbuf);
/* Set our default first. */
/* Don't word-wrap */
rc = ( tidyOptSetInt( tdoc, TidyWrapLen, 0 ) ? rc : -1 );
view all matches for this distribution
view release on metacpan or search on metacpan
HTML::Valid htv;
SV * html;
PREINIT:
SV * output;
SV * errors;
PPCODE:
html_valid_run (htv, html, & output, & errors);
EXTEND (SP, 2);
SvREFCNT_inc_simple_void_NN (output);
PUSHs (sv_2mortal (output));
SvREFCNT_inc_simple_void_NN (errors);
view all matches for this distribution
view release on metacpan or search on metacpan
ghttp_request *self
PREINIT:
char **hdrs;
int num_hdrs;
int i;
PPCODE:
if (ghttp_get_header_names(self, &hdrs, &num_hdrs) == -1) {
XSRETURN_UNDEF;
}
EXTEND(SP, num_hdrs);
get_status(self)
ghttp_request *self
PREINIT:
int code;
const char *reason;
PPCODE:
code = ghttp_status_code(self);
reason = ghttp_reason_phrase(self);
EXTEND(SP, 2);
PUSHs(sv_2mortal(newSViv(code)));
if (reason == NULL)
void
current_status(self)
ghttp_request *self
PREINIT:
ghttp_current_status status;
PPCODE:
status = ghttp_get_status(self);
EXTEND(SP, 3);
PUSHs(sv_2mortal(newSViv(status.proc)));
PUSHs(sv_2mortal(newSViv(status.bytes_read)));
PUSHs(sv_2mortal(newSViv(status.bytes_total)));
view all matches for this distribution
view release on metacpan or search on metacpan
fallback/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:
/* Change this to constant(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
type = constant(aTHX_ s, len, &iv);
/* Return 1 or 2 items. First is error message, or undef if no error.
Second, if present, is found value */
view all matches for this distribution
view release on metacpan or search on metacpan
_header_get( SV *self, SV *field_name, ... )
PREINIT:
char *field;
STRLEN len;
bool skip_standardize;
PPCODE:
field = SvPV(field_name, len);
skip_standardize = ( items == 3 ) && SvTRUE(ST(3));
if (!skip_standardize)
handle_standard_case(aTHX_ field, len);
PREINIT:
char *field;
STRLEN len;
bool found;
SV **a_value;
PPCODE:
field = SvPV(field_name, len);
handle_standard_case(aTHX_ field, len);
/* we are putting the decremented(with the number of input parameters) SP back in the THX */
void
_header_push(SV *self, SV *field_name, SV *val)
PREINIT:
char *field;
STRLEN len;
PPCODE:
field = SvPV(field_name, len);
handle_standard_case(aTHX_ field, len);
/* we are putting the decremented (with the number of
view all matches for this distribution
view release on metacpan or search on metacpan
OUTPUT:
RETVAL
void
parse_http_response(SV* buf, int header_format, HV* special_headers = NULL)
PPCODE:
{
int minor_version, status;
const char* msg;
size_t msg_len;
struct phr_header headers[MAX_HEADERS];
view all matches for this distribution
view release on metacpan or search on metacpan
#define URLDECODE_READ_SECOND_PART 4
void
url_decode( encoded )
SV* encoded
PPCODE:
SV* output = newSV( 100 );
STRLEN len;
char *input = SvPV(encoded, len);
view all matches for this distribution
view release on metacpan or search on metacpan
XSHeaders.xs view on Meta::CPAN
#
# Get all the keys in an existing HList.
#
void
header_field_names(HList* hl)
PPCODE:
GLOG(("=X= @@@ header_field_names(%p|%d), want %d",
hl, hlist_size(hl), GIMME_V));
hlist_sort(hl);
PUTBACK;
return_hlist(aTHX_ hl, "header_field_names", GIMME_V);
XSHeaders.xs view on Meta::CPAN
STRLEN len;
char* ckey = 0;
HNode* n = 0;
HList* seen = 0; /* TODO: make this more efficient; use Perl hash? */
PPCODE:
GLOG(("=X= @@@ header(%p|%d), %d params, want %d",
hl, hlist_size(hl), argc, GIMME_V));
argc = items - 1;
do {
XSHeaders.xs view on Meta::CPAN
SV* pkey = 0;
STRLEN len;
char* ckey = 0;
HNode* n = 0;
PPCODE:
GLOG(("=X= @@@ header(%p|%d), %d params, want %d",
hl, hlist_size(hl), argc, GIMME_V));
argc = items - 1;
if (argc != 1) {
XSHeaders.xs view on Meta::CPAN
STRLEN len;
char* ckey;
int size = 0;
int total = 0;
PPCODE:
GLOG(("=X= @@@ remove_header(%p|%d), %d params, want %d",
hl, hlist_size(hl), argc, GIMME_V));
argc = items - 1;
for (j = 1; j <= argc; ++j) {
view all matches for this distribution
view release on metacpan or search on metacpan
void
_sysinfo()
PREINIT:
system_info si;
PPCODE:
get_system_info(&si);
EXTEND(SP, 15);
PUSHs(sv_2mortal(newSViv(si.id[0])));
PUSHs(sv_2mortal(newSViv(si.id[1])));
PUSHs(sv_2mortal(newSVnv(si.boot_time)));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hash/BulkKeyCopy.xs view on Meta::CPAN
PREINIT:
int ht_kl,hs_kl,i;
char *k1, *k2;
SV **ptr1, **ptr2, **src_value;
STRLEN k1size,k2size;
PPCODE:
ht_kl = av_len(hash_target_keyarr) + 1;
hs_kl = av_len(hash_src_keyarr) + 1;
if (hs_kl == 0 || (ht_kl > 0 && hs_kl != ht_kl)) return;
for(i=0;i<hs_kl;i++) {
ptr1 = av_fetch(hash_target_keyarr, i, 0);
view all matches for this distribution
view release on metacpan or search on metacpan
GuavaRing.xs view on Meta::CPAN
#define svstrcmp(a,b) strcmp(SvPV_nolen(a),b)
MODULE = Hash::GuavaRing PACKAGE = Hash::GuavaRing
void new(...)
PPCODE:
if (items < 1) croak("Usage: %s->new(...)",SvPV_nolen(ST(0)));
GuavaRing * self = (GuavaRing *) safemalloc( sizeof(GuavaRing) );
if (unlikely(!self)) croak("Failed to allocate memory");
memset(self,0,sizeof(GuavaRing));
self->stash = gv_stashpv(SvPV_nolen(ST(0)), TRUE);
GuavaRing.xs view on Meta::CPAN
}
XSRETURN(1);
void DESTROY(SV *)
PPCODE:
register GuavaRing *self = ( GuavaRing * ) SvUV( SvRV( ST(0) ) );
if (self->nodes) SvREFCNT_dec(self->nodes);
if (self->self && SvOK(self->self) && SvOK( SvRV(self->self) )) {
SvREFCNT_inc(SvRV(self->self));
SvREFCNT_dec(self->self);
}
safefree(self);
XSRETURN_UNDEF;
void get (SV *, SV * key)
PPCODE:
register GuavaRing *self = ( GuavaRing * ) SvUV( SvRV( ST(0) ) );
// fprintf(stderr,"\nav_len(self->nodes) = %i\n",av_len(self->nodes));
int idx = guava( SvIV(key), av_len(self->nodes)+1 );
SV **node = av_fetch(self->nodes, idx, 0);
view all matches for this distribution