view release on metacpan or search on metacpan
void
getcwd(...)
ALIAS:
fastcwd=1
PPCODE:
{
dXSTARG;
/* fastcwd takes zero parameters: */
if (ix == 1 && items != 0)
croak_xs_usage(cv, "");
}
void
abs_path(pathsv=Nullsv)
SV *pathsv
PPCODE:
{
dXSTARG;
char *const path = pathsv ? SvPV_nolen(pathsv) : (char *)".";
char buf[MAXPATHLEN];
#if defined(WIN32) && !defined(UNDER_CE)
void
getdcwd(...)
PROTOTYPE: ENABLE
PPCODE:
{
dXSTARG;
int drive;
char *dir;
view all matches for this distribution
view release on metacpan or search on metacpan
AfterFork.xs view on Meta::CPAN
MODULE = Perl::AfterFork PACKAGE = Perl::AfterFork
void
reinit_pid()
PROTOTYPE:
PPCODE:
{
GV *tmpgv;
if ((tmpgv = gv_fetchpv("$", TRUE, SVt_PV))) {
SvREADONLY_off(GvSV(tmpgv));
# ifdef HAS_SYSCALL
AfterFork.xs view on Meta::CPAN
}
void
reinit_ppid()
PROTOTYPE:
PPCODE:
{
PL_ppid = (IV)getppid();
XSRETURN_YES;
}
void
reinit_pidstatus()
PROTOTYPE:
PPCODE:
{
hv_clear(PL_pidstatus); /* no kids, so don't wait for 'em */
XSRETURN_YES;
}
void
reinit()
PROTOTYPE:
PPCODE:
{
GV *tmpgv;
PL_ppid = (IV)getppid();
hv_clear(PL_pidstatus); /* no kids, so don't wait for 'em */
view all matches for this distribution
view release on metacpan or search on metacpan
share/perl-5.26/strtoull-fix-perl.h view on Meta::CPAN
# endif
#endif
/* gcc -Wall:
* for silencing unused variables that are actually used most of the time,
* but we cannot quite get rid of, such as "ax" in PPCODE+noargs xsubs,
* or variables/arguments that are used only in certain configurations.
*/
#ifndef PERL_UNUSED_ARG
# define PERL_UNUSED_ARG(x) ((void)sizeof(x))
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Perl/Lexer.xs view on Meta::CPAN
RETVAL
void
_name(token)
IV token;
PPCODE:
{
int i=0;
while (debug_tokens[i].token != 0) {
if (debug_tokens[i].token == token) {
XSRETURN_PV(debug_tokens[i].name);
lib/Perl/Lexer.xs view on Meta::CPAN
}
void
_type(token)
IV token;
PPCODE:
{
int i=0;
while (debug_tokens[i].token != 0) {
if (debug_tokens[i].token == token) {
XSRETURN_IV(debug_tokens[i].type);
view all matches for this distribution
view release on metacpan or search on metacpan
MODULE = Perl__Phase PACKAGE = Perl::Phase
SV*
current_phase()
PPCODE:
{
XPUSHs(newSViv(PL_phase));
}
BOOT:
view all matches for this distribution
view release on metacpan or search on metacpan
t/15_eval.t view on Meta::CPAN
void
add_doc(self, doc_sv)
lucy_Simple *self;
SV *doc_sv;
PPCODE:
{
lucy_Doc *doc = NULL;
// Either get a Doc or use the stock doc.
if (sv_isobject(doc_sv)
view all matches for this distribution
view release on metacpan or search on metacpan
RPM/Database.xs view on Meta::CPAN
void
rpmdb_FIRSTKEY(self)
RPM::Database self;
PROTOTYPE: $
PPCODE:
{
const char *name;
RPM__Header hdr;
if (rpmdb_FIRSTKEY(aTHX_ self, &name, &hdr))
RPM/Database.xs view on Meta::CPAN
void
rpmdb_NEXTKEY(self, prev_name=NULL)
RPM::Database self;
const char *prev_name;
PROTOTYPE: $;$
PPCODE:
{
const char *name;
RPM__Header hdr;
if (rpmdb_NEXTKEY(aTHX_ self, prev_name, &name, &hdr))
RPM/Database.xs view on Meta::CPAN
find_by_group = RPMTAG_GROUP
find_what_provides = RPMTAG_PROVIDENAME
find_what_requires = RPMTAG_REQUIRENAME
find_what_conflicts = RPMTAG_CONFLICTNAME
find_by_package = RPMTAG_NAME
PPCODE:
/* This is a front-end to all the rpmdbFindBy*() set, including FindByPackage
which differs from FETCH above in that if there is actually more than one
match, all will be returned. */
{
const char *str = Nullch;
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
lib/PerlIO/Layers.xs view on Meta::CPAN
get_buffer_sizes(handle);
PerlIO* handle;
PREINIT:
PerlIO* current;
int counter = 0;
PPCODE:
for (current = handle; *current; current = PerlIONext(current)) {
PerlIOBuf* buffer;
if (!(PerlIOBase(current)->tab->kind & PERLIO_K_BUFFERED))
continue;
buffer = PerlIOSelf(current, PerlIOBuf);
view all matches for this distribution
view release on metacpan or search on metacpan
PerlIO-Util.xs view on Meta::CPAN
void
known_layers(...)
PREINIT:
const PerlIO_list_t* const layers = PL_known_layers;
int i;
PPCODE:
EXTEND(SP, layers->cur);
for(i = 0; i < layers->cur; i++){
SV* const name = newSVpv( LayerFetch(layers, i)->name, 0);
PUSHs( sv_2mortal(name) );
}
PerlIO-Util.xs view on Meta::CPAN
SV* arg
PREINIT:
PerlIO_funcs* tab;
const char* laypv;
STRLEN laylen;
PPCODE:
laypv = SvPV_const(layer, laylen);
if(laypv[0] == ':'){ /* ignore a layer prefix */
laypv++;
laylen--;
}
PerlIO-Util.xs view on Meta::CPAN
void
pop_layer(filehandle)
PerlIO* filehandle
PREINIT:
const char* popped_layer;
PPCODE:
if(!PerlIOValid(filehandle)) XSRETURN_EMPTY;
popped_layer = PerlIOBase(filehandle)->tab->name;
PerlIO_flush(filehandle);
PerlIO_pop(aTHX_ filehandle);
view all matches for this distribution
view release on metacpan or search on metacpan
SSize_t count
PROTOTYPE:
*$
PREINIT:
dXSTARG;
PPCODE:
if (count < 0)
XSRETURN_UNDEF;
SvUPGRADE(TARG, SVt_PV);
SvGROW(TARG, 256);
view all matches for this distribution
view release on metacpan or search on metacpan
magick_registry=NewSplayTree((int (*)(const void *,const void *))
NULL,(void *(*)(void *)) NULL,(void *(*)(void *)) NULL);
void
UNLOAD()
PPCODE:
{
if (magick_registry != (SplayTreeInfo *) NULL)
magick_registry=DestroySplayTree(magick_registry);
MagickCoreTerminus();
}
Image::Magick ref=NO_INIT
ALIAS:
AnimateImage = 1
animate = 2
animateimage = 3
PPCODE:
{
ExceptionInfo
*exception;
Image
Image::Magick ref=NO_INIT
ALIAS:
AppendImage = 1
append = 2
appendimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
AverageImage = 1
average = 2
averageimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
BlobToImage = 1
blobtoimage = 2
blobto = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
ChannelFxImage = 1
channelfx = 2
channelfximage = 3
PPCODE:
{
AV
*av;
char
copyimage = 3
CloneImage = 4
clone = 5
cloneimage = 6
Clone = 7
PPCODE:
{
AV
*av;
ExceptionInfo
Image::Magick ref=NO_INIT
ALIAS:
CoalesceImage = 1
coalesce = 2
coalesceimage = 3
PPCODE:
{
AV
*av;
ExceptionInfo
Image::Magick ref=NO_INIT
ALIAS:
CompareImages = 1
compare = 2
compareimage = 3
PPCODE:
{
AV
*av;
char
ComplexImages(ref)
Image::Magick ref=NO_INIT
ALIAS:
ComplexImages = 1
compleximages = 2
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
CompareImagesLayers = 1
comparelayers = 2
compareimagelayers = 3
PPCODE:
{
AV
*av;
char
#
#
void
DESTROY(ref)
Image::Magick ref=NO_INIT
PPCODE:
{
SV
*reference;
PERL_UNUSED_VAR(ref);
Image::Magick ref=NO_INIT
ALIAS:
DisplayImage = 1
display = 2
displayimage = 3
PPCODE:
{
ExceptionInfo
*exception;
Image
EvaluateImages(ref)
Image::Magick ref=NO_INIT
ALIAS:
EvaluateImages = 1
evaluateimages = 2
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
FeaturesImage = 1
features = 2
featuresimage = 3
PPCODE:
{
#define ChannelFeatures(channel,direction) \
{ \
(void) FormatLocaleString(message,MagickPathExtent,"%.20g", \
channel_features[channel].angular_second_moment[direction]); \
Image::Magick ref=NO_INIT
ALIAS:
FlattenImage = 1
flatten = 2
flattenimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
FxImage = 1
fx = 2
fximage = 3
PPCODE:
{
AV
*av;
char
GetAttributes = 1
GetAttribute = 2
get = 3
getattributes = 4
getattribute = 5
PPCODE:
{
char
*attribute,
color[MagickPathExtent];
Image::Magick ref=NO_INIT
ALIAS:
HistogramImage = 1
histogram = 2
histogramimage = 3
PPCODE:
{
AV
*av;
char
GetPixel(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
getpixel = 1
getPixel = 2
PPCODE:
{
AV
*av;
char
GetPixels(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
getpixels = 1
getPixels = 2
PPCODE:
{
AV
*av;
char
ALIAS:
ImageToBlob = 1
imagetoblob = 2
toblob = 3
blob = 4
PPCODE:
{
char
filename[MagickPathExtent];
ExceptionInfo
Layers = 1
layers = 2
OptimizeImageLayers = 3
optimizelayers = 4
optimizeimagelayers = 5
PPCODE:
{
AV
*av;
char
BilateralBlur = 305
BilateralBlurImage = 306
SortPixels = 307
SortPixelsImage = 308
MogrifyRegion = 666
PPCODE:
{
AffineMatrix
affine,
current;
Image::Magick ref=NO_INIT
ALIAS:
MontageImage = 1
montage = 2
montageimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
MorphImage = 1
morph = 2
morphimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
MosaicImage = 1
mosaic = 2
mosaicimage = 3
PPCODE:
{
AV
*av;
ExceptionInfo
Image::Magick ref=NO_INIT
ALIAS:
PingImage = 1
ping = 2
pingimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
PreviewImage = 1
preview = 2
previewimage = 3
PPCODE:
{
AV
*av;
ExceptionInfo
void
QueryColor(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
querycolor = 1
PPCODE:
{
char
*name;
ExceptionInfo
void
QueryColorname(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
querycolorname = 1
PPCODE:
{
AV
*av;
char
void
QueryFont(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
queryfont = 1
PPCODE:
{
char
*name,
message[MagickPathExtent];
void
QueryFontMetrics(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
queryfontmetrics = 1
PPCODE:
{
AffineMatrix
affine,
current;
void
QueryMultilineFontMetrics(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
querymultilinefontmetrics = 1
PPCODE:
{
AffineMatrix
affine,
current;
void
QueryFormat(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
queryformat = 1
PPCODE:
{
char
*name;
ExceptionInfo
void
QueryOption(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
queryoption = 1
PPCODE:
{
char
**options;
ExceptionInfo
Image::Magick ref=NO_INIT
ALIAS:
ReadImage = 1
read = 2
readimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
RemoteCommand = 1
remote = 2
remoteCommand = 3
PPCODE:
{
AV
*av;
ExceptionInfo
SetAttributes = 1
SetAttribute = 2
set = 3
setattributes = 4
setattribute = 5
PPCODE:
{
ExceptionInfo
*exception;
Image
SetPixel(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
setpixel = 1
setPixel = 2
PPCODE:
{
AV
*av;
char
SetPixels(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
setpixels = 1
setPixels = 2
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
SmushImage = 1
smush = 2
smushimage = 3
PPCODE:
{
AV
*av;
char
Image::Magick ref=NO_INIT
ALIAS:
StatisticsImage = 1
statistics = 2
statisticsimage = 3
PPCODE:
{
#define ChannelStatistics(channel) \
{ \
(void) FormatLocaleString(message,MagickPathExtent,"%.20g", \
(double) channel_statistics[channel].depth); \
Image::Magick ref=NO_INIT
ALIAS:
WriteImage = 1
write = 2
writeimage = 3
PPCODE:
{
char
filename[MagickPathExtent];
ExceptionInfo
view all matches for this distribution
view release on metacpan or search on metacpan
PerlMaple.xs view on Meta::CPAN
void
maple_eval (expr)
char * expr
PREINIT:
I32* temp;
PPCODE:
temp = PL_markstack_ptr++;
warninfo[0] = '\0';
result[0] = '\0';
maple_eval(expr);
if (PL_markstack_ptr != temp) {
view all matches for this distribution
view release on metacpan or search on metacpan
PerlQt/Qt.xs view on Meta::CPAN
MODULE = Qt PACKAGE = Qt::_internal
PROTOTYPES: DISABLE
void
getMethStat()
PPCODE:
XPUSHs(sv_2mortal(newSViv((int)methcache->size())));
XPUSHs(sv_2mortal(newSViv((int)methcache->count())));
void
getClassStat()
PPCODE:
XPUSHs(sv_2mortal(newSViv((int)classcache->size())));
XPUSHs(sv_2mortal(newSViv((int)classcache->count())));
void
getIsa(classId)
int classId
PPCODE:
Smoke::Index *parents =
qt_Smoke->inheritanceList +
qt_Smoke->classes[classId].parents;
while(*parents)
XPUSHs(sv_2mortal(newSVpv(qt_Smoke->classes[*parents++].className, 0)));
PerlQt/Qt.xs view on Meta::CPAN
void
findMethod(c, name)
char *c
char *name
PPCODE:
Smoke::Index meth = qt_Smoke->findMethod(c, name);
// printf("DAMNIT on %s::%s => %d\n", c, name, meth);
if(!meth) {
// empty list
} else if(meth > 0) {
PerlQt/Qt.xs view on Meta::CPAN
void
findMethodFromIds(idclass, idmethodname)
int idclass
int idmethodname
PPCODE:
Smoke::Index meth = qt_Smoke->findMethod(idclass, idmethodname);
if(!meth) {
// empty list
} else if(meth > 0) {
Smoke::Index i = qt_Smoke->methodMaps[meth].method;
PerlQt/Qt.xs view on Meta::CPAN
OUTPUT:
RETVAL
SV *
callMethod(...)
PPCODE:
if(_current_method) {
MethodCall c(qt_Smoke, _current_method, &ST(0), items);
c.next();
SV *ret = c.var();
SvREFCNT_inc(ret);
view all matches for this distribution
view release on metacpan or search on metacpan
INCLUDE: const-xs.inc
void
arrayskip (...)
PROTOTYPE: @
PPCODE:
{
int i;
if (items == 0)
{
view all matches for this distribution
view release on metacpan or search on metacpan
void
maybe (x, y, ...)
SV *x
SV *y
PROTOTYPE: $$@
PPCODE:
{
int i;
if (sv_defined(x) && sv_defined(y))
{
provided (chk, x, y, ...)
SV *chk
SV *x
SV *y
PROTOTYPE: $$$@
PPCODE:
{
int i;
if (SvTRUE(chk))
{
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
lib/Perlito5/XS/Emitter.pm view on Meta::CPAN
if $self->{name};
my $sig = $self->{sig};
my $i = 0;
'void ' . $name . "()\n"
. "PPCODE:\n"
. join(";\n", map( Perlito5::XS::tab($level+1) . $_->emit_xs( $level + 1 ), @{$self->{block}} )) . ";\n"
}
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
void
PQdefaults(...)
PREINIT:
PQconninfoOption *opts;
int n = 0;
PPCODE:
opts = PQconndefaults();
if (opts) {
for (; opts[n].keyword; n++) {
HV *hv = newHV();
XPUSHs(newRV_noinc((SV*)hv));
# makeCancel = 0
void PQnotifies(PGconn *conn)
PREINIT:
PGnotify *notice;
PPCODE:
notice = PQnotifies(conn);
if (notice) {
int pid = notice->be_pid;
SV *name = sv_2mortal(my_newSVpv_utf8(aTHX_ notice->relname));
SV *extra = sv_2mortal(my_newSVpv_utf8(aTHX_ notice->extra));
PQfnames(PGresult *res)
ALIAS:
columnNames = 0
PREINIT:
int cols;
PPCODE:
cols = PQnfields(res);
if (cols) {
int j;
if (GIMME_V != G_ARRAY) cols = 1;
EXTEND(sp, cols);
PQgettuple(PGresult *res, UV i = 0)
ALIAS:
row = 0
PREINIT:
int rows, cols, j;
PPCODE:
rows = PQntuples(res);
cols = PQnfields(res);
if ((i > rows) || !cols)
XSRETURN(0);
else {
PQgettuple_as_hash(PGresult *res, ...)
ALIAS:
rowAsHash = 0
PREINIT:
int i, rows, cols;
PPCODE:
i = (items > 1 ? SvIV(ST(1)) : 0);
rows = PQntuples(res);
cols = PQnfields(res);
if ((i > rows) || !cols)
XSRETURN(0);
PQgetcolumn(PGresult *res, int j = 0)
ALIAS:
column = 0
PREINIT:
int rows, cols, i;
PPCODE:
rows = PQntuples(res);
cols = PQnfields(res);
if ((j > cols) || !rows)
XSRETURN(0);
else {
PQgettuples(PGresult *res)
ALIAS:
rows = 0
PREINIT:
int rows, cols, i, j;
PPCODE:
rows = PQntuples(res);
cols = PQnfields(res);
if (GIMME_V != G_ARRAY) {
mPUSHi(rows);
XSRETURN(1);
PQgettuples_as_hashes(PGresult *res)
ALIAS:
rowsAsHashes = 0
PREINIT:
int rows, cols, i, j;
PPCODE:
rows = PQntuples(res);
cols = PQnfields(res);
if (GIMME_V != G_ARRAY) {
mPUSHi(cols);
XSRETURN(1);
PQgetcolumns(PGresult *res)
ALIAS:
columns = 0
PREINIT:
int rows, cols, i, j;
PPCODE:
rows = PQntuples(res);
cols = PQnfields(res);
if (GIMME_V != G_ARRAY) {
mPUSHi(cols);
XSRETURN(1);
view all matches for this distribution
view release on metacpan or search on metacpan
xs/Event.xs view on Meta::CPAN
void
uri (PgmEvent *event)
PREINIT:
gchar **i;
PPCODE:
for (i = event->dnd.uri; *i; i++) {
XPUSHs (newSVGChar (*i));
}
BOOT:
view all matches for this distribution
view release on metacpan or search on metacpan
LibPkgConf.xs view on Meta::CPAN
argv_split(src)
const char *src
INIT:
int argc, ret, i;
char **argv;
PPCODE:
ret = pkgconf_argv_split(src, &argc, &argv);
if(ret == 0)
{
for(i=0; i<argc; i++)
{
view all matches for this distribution
view release on metacpan or search on metacpan
Postgres.xs view on Meta::CPAN
void
query_fetchrow(q)
QUERY *q;
PROTOTYPE: $
PPCODE:
if (q && q->res) {
int cols = PQnfields(q->res);
/* return empty list when no more data */
if (PQntuples(q->res) > q->cur_row) { /* out of tuples to return */
int cur_col = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
}
void
convert_to_magick(prima_image,magick_image)
PROTOTYPE: DISABLE
PPCODE:
{
pim_image pim;
Image * ip;
SV * sv;
}
void
convert_to_prima(magick_image,prima_image)
PROTOTYPE: DISABLE
PPCODE:
{
Image * ip;
pim_image pim;
#if MagickLibVersion > 0x676
ExceptionInfo* exception;
view all matches for this distribution
view release on metacpan or search on metacpan
Primesieve.xs view on Meta::CPAN
UV stop
PREINIT:
size_t i;
size_t size;
UV *ret;
PPCODE:
ret = primesieve_generate_primes (start, stop, &size, UINT64_PRIMES);
if (!size) {
XSRETURN_EMPTY;
}
if (GIMME_V == G_ARRAY) {
Primesieve.xs view on Meta::CPAN
UV n
UV start
PREINIT:
size_t i;
UV *ret;
PPCODE:
if (!n) {
XSRETURN_EMPTY;
}
ret = (UV*) primesieve_generate_n_primes (n, start, UINT64_PRIMES);
if (GIMME_V == G_ARRAY) {
view all matches for this distribution
view release on metacpan or search on metacpan
if ((!SvROK(pids_ref)) || (SvTYPE(SvRV(pids_ref)) != SVt_PVAV) ||
((npids = av_len((AV *)SvRV(pids_ref))) < 0)) {
XSRETURN_UNDEF;
}
pids = (AV *)SvRV(pids_ref);
PPCODE:
for(i=0; i<=npids; i++) {
pid_sv = *av_fetch(pids, i, 0);
pid = get_pid(pid_sv);
view all matches for this distribution
view release on metacpan or search on metacpan
ProcessTable.xs view on Meta::CPAN
RETVAL
void
fields(obj)
SV* obj
PPCODE:
/* see above. This should be called on an object generated by new */
if (!obj || !SvOK (obj) || !SvROK (obj) || !sv_isobject (obj)) {
croak("Must call fields from an initalized object created with new");
}
view all matches for this distribution
view release on metacpan or search on metacpan
PROTOTYPES: DISABLE
void
wait3(block)
int block
PPCODE:
int stat;
struct rusage r;
pid_t pid;
pid = wait3(&stat, block ? 0 : WNOHANG, &r);
if (pid > 0)
view all matches for this distribution
view release on metacpan or search on metacpan
# ithreads would seem to be a very bad idea in Promise-based code,
# but anyway ..
void
CLONE(...)
PPCODE:
SV* pxs_flush_cr = NULL;
SV* deferral_cr = NULL;
event_system_t event_system;
SV* deferral_arg = NULL;
OUTPUT:
RETVAL
void
then(SV* self_sv, SV* on_resolve = NULL, SV* on_reject = NULL)
PPCODE:
_CROAK_IF_LOOKS_LIKE_INFINITE_RECURSION;
PROMISE_CLASS_TYPE* self = _get_promise_from_sv(aTHX_ self_sv);
xspr_promise_t* next;
XSRETURN(next ? 1 : 0);
void
catch(SV* self_sv, SV* on_reject)
PPCODE:
_CROAK_IF_LOOKS_LIKE_INFINITE_RECURSION;
PROMISE_CLASS_TYPE* self = _get_promise_from_sv(aTHX_ self_sv);
xspr_promise_t* next = create_next_promise_if_needed(aTHX_ self_sv, &ST(0));
XSRETURN(next ? 1 : 0);
void
finally(SV* self_sv, SV* on_finally)
PPCODE:
_CROAK_IF_LOOKS_LIKE_INFINITE_RECURSION;
PROMISE_CLASS_TYPE* self = _get_promise_from_sv(aTHX_ self_sv);
xspr_promise_t* next = create_next_promise_if_needed(aTHX_ self_sv, &ST(0));
OUTPUT:
RETVAL
void
AWAIT_GET(SV *self_sv)
PPCODE:
_DO_DEBUG_AWAITABLE();
DEFERRED_CLASS_TYPE* self = _get_deferred_from_sv(aTHX_ self_sv);
ASSUME(self->promise->state == XSPR_STATE_FINISHED);
SvREFCNT_inc(coderef);
SvREFCNT_inc(SvRV(coderef));
void
AWAIT_WAIT(SV* self_sv)
PPCODE:
_DO_DEBUG_AWAITABLE();
dMY_CXT;
switch (MY_CXT.event_system) {
case _DEFER_ANYEVENT:
view all matches for this distribution
view release on metacpan or search on metacpan
Fingerprint *fprint;
int context_created = 0;
int fprint_added = 0;
char * account_name;
char * account_protocol;
PPCODE:
{
ctx = ACCOUNT2CTX(account);
if ( SvOK(sv_fprint) ) {
STRLEN flen;
Fingerprint *fingerprint;
OTRctx *ctx;
char *contact_name;
char *account_name;
char *account_protocol;
PPCODE:
{
HV *account = (HV*)HASHGET(contact, "act", 3);
ctx = ACCOUNT2CTX(account);
SV *fprint
PROTOTYPE: $
PREINIT:
char *hex_fingerprint;
unsigned char *fprint_bytes;
PPCODE:
{
fprint_bytes = (unsigned char*)SvPVbyte_nolen(HASHGET(fprint, "fingerprint", 11));
Newx(hex_fingerprint, OTRL_PRIVKEY_FPRINT_HUMAN_LEN, char);
Fingerprint * fingerprint;
int is_verified;
char *contact_name;
char *account_name;
char *account_protocol;
PPCODE:
{
HV *contact = (HV*)HASHGET(fprint, "cnt", 3);
HV *account = (HV*)HASHGET(contact, "act", 3);
ctx = ACCOUNT2CTX(account);
init(channel)
SV * channel
ALIAS:
refresh = 1
PROTOTYPE: $
PPCODE:
{
send_default_query_msg(channel);
XSRETURN_YES;
}
int context_created = 0;
OTRctx * ctx;
char *contact_name;
char * account_name;
char * account_protocol;
PPCODE:
{
HV * contact = (HV*)CHANNEL2CONTACT(channel);
HV * account = (HV*)CONTACT2ACCOUNT(contact);
ctx = CHANNEL2CTX(channel);
PREINIT:
OTRctx * ctx;
char *contact_name;
char *account_name;
char *account_protocol;
PPCODE:
{
HV * contact = (HV*)CHANNEL2CONTACT(channel);
HV * account = (HV*)CONTACT2ACCOUNT(contact);
ctx = ACCOUNT2CTX(account);
PREINIT:
OTRctx * ctx;
char *contact_name;
char *account_name;
char *account_protocol;
PPCODE:
{
ConnContext *context;
int context_created = 0;
gcry_error_t err;
char *newmessage = NULL;
void
ping(channel)
SV * channel
PROTOTYPE: $
PPCODE:
{
OTRctx * ctx = CHANNEL2CTX(channel);
otrl_message_poll(ctx->userstate, &callbacks, channel);
XSRETURN_YES;
void
smp_verify(channel, answer, ...)
SV * channel
SV * answer
PROTOTYPE: $$;$
PPCODE:
{
ConnContext *context;
int context_created = 0;
char * question = NULL;
STRLEN slen;
void
smp_respond(channel, response)
SV * channel
unsigned char *response
PROTOTYPE: $$
PPCODE:
{
ConnContext *context;
int context_created = 0;
OTRctx * ctx;
char *contact_name;
void
smp_abort(channel)
SV * channel
PROTOTYPE: $
PPCODE:
{
ConnContext *context;
int context_created = 0;
OTRctx * ctx;
char *contact_name;
void
read(channel, input)
SV * channel
char * input
PROTOTYPE: $$
PPCODE:
{
int res;
char *newmessage = NULL;
OtrlTLV *tlvs = NULL;
OtrlTLV *tlv = NULL;
PROTOTYPE: $
PREINIT:
HV * sessions;
HE * entry;
I32 count;
PPCODE:
{
sessions = (HV*)SvRV(HASHGET(channel, "known_sessions", 14));
count = hv_iterinit(sessions);
EXTEND(SP, count);
ConnContext *context;
OTRctx * ctx;
char *contact_name;
char * account_name;
char * account_protocol;
PPCODE:
{
HV * contact = (HV*)CHANNEL2CONTACT(channel);
HV * account = (HV*)CONTACT2ACCOUNT(contact);
ctx = CHANNEL2CTX(channel);
ConnContext *context;
OTRctx * ctx;
char *contact_name;
char *account_name;
char *account_protocol;
PPCODE:
{
HV * contact = (HV*)CHANNEL2CONTACT(channel);
HV * account = (HV*)CONTACT2ACCOUNT(contact);
ctx = ACCOUNT2CTX(account);
Fingerprint *fingerprint;
OTRctx *ctx;
char *contact_name;
char *account_name;
char *account_protocol;
PPCODE:
{
HV * contact = (HV*)CHANNEL2CONTACT(channel);
HV * account = (HV*)CONTACT2ACCOUNT(contact);
ctx = ACCOUNT2CTX(account);
view all matches for this distribution
view release on metacpan or search on metacpan
PROTOTYPE: $$;$$
PREINIT:
int tids[MAXPROCS];
int info;
int i;
PPCODE:
info = pvm_spawn(task,0,flag,where,ntask,tids);
XPUSHs(sv_2mortal(newSViv(info)));
if ( i > 0 ){
for (i=0;i<info;i++){
XPUSHs(sv_2mortal(newSViv(tids[i])));
PREINIT:
int info, src, stag, scnt;
char str[MAXSTR];
char *po;
int type;
PPCODE:
info = pvm_precv(tid,tag,str,MAXSTR,PVM_BYTE,&src,&stag,&scnt);
XPUSHs(sv_2mortal(newSViv(info)));
XPUSHs(sv_2mortal(newSViv(src)));
XPUSHs(sv_2mortal(newSViv(stag)));
po = strtok(str,"\v");
unpack()
PROTOTYPE:
PREINIT:
char str[MAXSTR], *po;
int type;
PPCODE:
pvm_upkstr(str);
po = strtok(str,"\v");
while ( po != NULL ){
type = string_type(po);
switch(type){
int ntask,i,info;
struct pvmtaskinfo *taskp;
int ti_tid,ti_ptid,ti_host,ti_flag,ti_pid;
char ti_a_out[256];
HV *hv_tmp;
PPCODE:
info = pvm_tasks(where,&ntask,&taskp);
XPUSHs(sv_2mortal(newSViv(info)));
for(i=0;i<ntask;i++){
strcpy(ti_a_out,taskp[i].ti_a_out);
ti_tid = taskp[i].ti_tid;
struct pvmhostinfo *hostp;
char hi_name[256], hi_arch[256];
int hi_tid, hi_speed;
int i;
HV *hv_tmp;
PPCODE:
info = pvm_config(&nhosts,&narch,&hostp);
XPUSHs(sv_2mortal(newSViv(info)));
for (i=0;i<nhosts;i++){
hi_tid = hostp[i].hi_tid;
strcpy(hi_name,hostp[i].hi_name);
int i;
int info;
char *po;
char *hosts[MAXHOSTS];
int infos[MAXHOSTS];
PPCODE:
if ( items < 1 )
croak("Usage: Pvm::pvm_addhosts(host_list)");
for (i=0;i<items;i++){
hosts[i] = (char *)SvPV(ST(i),na);
/*
PREINIT:
char *po;
char *hosts[MAXHOSTS];
int infos[MAXHOSTS];
int info, i, nhost;
PPCODE:
if ( items < 1 )
croak("Usage: Pvm::pvm_delhosts(host_list)");
for (i=0;i<items;i++){
hosts[i] = (char *)SvPV(ST(i),na);
/*
bufinfo(bufid)
int bufid
PROTOTYPE: $
PREINIT:
int bytes, tag, tid, info;
PPCODE:
info = pvm_bufinfo(bufid,&bytes,&tag,&tid);
XPUSHs(sv_2mortal(newSViv(info)));
XPUSHs(sv_2mortal(newSViv(bytes)));
XPUSHs(sv_2mortal(newSViv(tag)));
XPUSHs(sv_2mortal(newSViv(tid)));
PREINIT:
struct timeval rclk, delta;
int info;
int sec, usec;
HV *hv_tmp;
PPCODE:
info = pvm_hostsync(hst,&rclk,&delta);
XPUSHs(sv_2mortal(newSViv(info)));
sec = rclk.tv_sec;
usec = rclk.tv_usec;
/* set up hash entry */
view all matches for this distribution