Result:
found more than 1151 distributions - search limited to the first 2001 files matching your query ( run in 1.844 )


Imager-File-AVIF

 view release on metacpan or  search on metacpan

AVIF.xs  view on Meta::CPAN

        Imager::IO     ig
      PREINIT:
        i_img **imgs;
        int count;
        int i;
      PPCODE:
        imgs = i_readavif_multi(ig, &count);
        if (imgs) {
          EXTEND(SP, count);
          for (i = 0; i < count; ++i) {
            SV *sv = sv_newmortal();

 view all matches for this distribution


Imager-File-GIF

 view release on metacpan or  search on metacpan

GIF.xs  view on Meta::CPAN

	        int     colours, q, w;
	      i_img*    rimg;
                 SV*    temp[3];
                 AV*    ct; 
                 SV*    r;
	       PPCODE:
 	       colour_table = NULL;
               colours = 0;

	if(GIMME_V == G_ARRAY) {
            rimg = i_readgif_wiol(ig,&colour_table,&colours);

GIF.xs  view on Meta::CPAN

        Imager::IO ig
      PREINIT:
        i_img **imgs;
        int count;
        int i;
      PPCODE:
        imgs = i_readgif_multi_wiol(ig, &count);
        if (imgs) {
          EXTEND(SP, count);
          for (i = 0; i < count; ++i) {
            SV *sv = sv_newmortal();

 view all matches for this distribution


Imager-File-HEIF

 view release on metacpan or  search on metacpan

HEIF.xs  view on Meta::CPAN

        Imager::IO     ig
      PREINIT:
        i_img **imgs;
        int count;
        int i;
      PPCODE:
        imgs = i_readheif_multi(ig, &count, max_threads(aTHX));
        if (imgs) {
          EXTEND(SP, count);
          for (i = 0; i < count; ++i) {
            SV *sv = sv_newmortal();

HEIF.xs  view on Meta::CPAN

  PREINIT:
    size_t count;
    struct compression_names_t const *names =
        i_heif_compression_names(&count);
    size_t i;
  PPCODE:
    EXTEND(SP, count);
    /* 0 is "undefined" */
    for (i = 1; i < count; ++i)
      PUSHs(sv_2mortal(newSVpv(names[i].name, 0)));

HEIF.xs  view on Meta::CPAN

    int count;
    int i;
    struct heif_context *ctx = heif_context_alloc();
    HV *enc_stash = gv_stashpv("Imager::File::HEIF::Encoder", TRUE);
    HV *param_stash = gv_stashpv("Imager::File::HEIF::Encoder::Parameter", TRUE);
  PPCODE:
#if LIBHEIF_HAVE_VERSION(1, 15, 0)
    count = heif_get_encoder_descriptors(fmt, NULL, descs, MAX_ENCODERS);
#else
    count = heif_context_get_encoder_descriptors(ctx, fmt, NULL, descs, MAX_ENCODERS);
#endif

 view all matches for this distribution


Imager-File-JPEG

 view release on metacpan or  search on metacpan

JPEG.xs  view on Meta::CPAN

	     PREINIT:
	      char*    iptc_itext;
	       int     tlength;
	     i_img*    rimg;
                SV*    r;
	     PPCODE:
 	      iptc_itext = NULL;
	      rimg = i_readjpeg_wiol(ig,-1,&iptc_itext,&tlength);
	      if (iptc_itext == NULL) {
		    r = sv_newmortal();
	            EXTEND(SP,1);

 view all matches for this distribution


Imager-File-PNG

 view release on metacpan or  search on metacpan

PNG.xs  view on Meta::CPAN


void
i_png_features(...)
  PREINIT:
    const char * const *p;
  PPCODE:
    p = i_png_features();
    while (*p) {
      EXTEND(SP, 1);
      PUSHs(sv_2mortal(newSVpv(*p, 0)));
      ++p;

 view all matches for this distribution


Imager-File-QOI

 view release on metacpan or  search on metacpan

QOI.xs  view on Meta::CPAN

        Imager::IO     ig
      PREINIT:
        i_img **imgs;
        int count;
        int i;
      PPCODE:
        imgs = i_readqoi_multi(ig, &count);
        if (imgs) {
          EXTEND(SP, count);
          for (i = 0; i < count; ++i) {
            SV *sv = sv_newmortal();

 view all matches for this distribution


Imager-File-TIFF

 view release on metacpan or  search on metacpan

TIFF.xs  view on Meta::CPAN

        Imager::IO     ig
      PREINIT:
        i_img **imgs;
        int count;
        int i;
      PPCODE:
        imgs = i_readtiff_multi_wiol(ig, &count);
        if (imgs) {
          EXTEND(SP, count);
          for (i = 0; i < count; ++i) {
            SV *sv = sv_newmortal();

TIFF.xs  view on Meta::CPAN

i_tiff_libversion(...)
  C_ARGS:

void
i_tiff_codecs(class)
    PPCODE:
      size_t count;
      i_tiff_codec *codecs = i_tiff_get_codecs(&count);
      EXTEND(SP, count);
      for (int i = 0; i < count; ++i) {
        i_tiff_codec *codec = codecs + i;

 view all matches for this distribution


Imager-File-WEBP

 view release on metacpan or  search on metacpan

WEBP.xs  view on Meta::CPAN

        Imager::IO     ig
      PREINIT:
        i_img **imgs;
        int count;
        int i;
      PPCODE:
        imgs = i_readwebp_multi(ig, &count);
        if (imgs) {
          EXTEND(SP, count);
          for (i = 0; i < count; ++i) {
            SV *sv = sv_newmortal();

 view all matches for this distribution


Imager-Font-FT2

 view release on metacpan or  search on metacpan

FT2.xs  view on Meta::CPAN

        i_img_dim bbox[BOUNDING_BOX_COUNT];
        int i;
        char *text;
        STRLEN text_len;
        int rc;
      PPCODE:
        text = SvPV(text_sv, text_len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

FT2.xs  view on Meta::CPAN

      PREINIT:
        i_img_dim bbox[8];
        int i;
        const char *text;
	STRLEN len;
      PPCODE:
        text = SvPV(text_sv, len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

FT2.xs  view on Meta::CPAN

        i_img_dim x1
        i_img_dim x2
        i_img_dim x3
      PREINIT:
        i_img_dim box[4];
      PPCODE:
        box[0] = x0; box[1] = x1; box[2] = x2; box[3] = x3;
        ft2_transform_box(font, box);
          EXTEND(SP, 4);
          PUSHs(sv_2mortal(newSViv(box[0])));
          PUSHs(sv_2mortal(newSViv(box[1])));

FT2.xs  view on Meta::CPAN

        char *text;
        STRLEN len;
        char *work;
        size_t count;
        size_t i;
      PPCODE:
        text = SvPV(text_sv, len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

FT2.xs  view on Meta::CPAN

i_ft2_face_name(handle)
        Imager::Font::FT2x handle
      PREINIT:
        char name[255];
        size_t len;
      PPCODE:
        len = i_ft2_face_name(handle, name, sizeof(name));
        if (len) {
          EXTEND(SP, 1);
          PUSHs(sv_2mortal(newSVpv(name, 0)));
        }

FT2.xs  view on Meta::CPAN

        char const *text;
        STRLEN work_len;
        size_t len;
        char name[255];
	SSize_t count = 0;
      PPCODE:
        i_clear_error();
        text = SvPV(text_sv, work_len);
        len = work_len;
#ifdef SvUTF8
        if (SvUTF8(text_sv))

FT2.xs  view on Meta::CPAN

i_ft2_get_multiple_masters(handle)
        Imager::Font::FT2x handle
      PREINIT:
        i_font_mm mm;
        int i;
      PPCODE:
        if (i_ft2_get_multiple_masters(handle, &mm)) {
          EXTEND(SP, 2+mm.num_axis);
          PUSHs(sv_2mortal(newSViv(mm.num_axis)));
          PUSHs(sv_2mortal(newSViv(mm.num_designs)));
          for (i = 0; i < mm.num_axis; ++i) {

 view all matches for this distribution


Imager-Font-T1

 view release on metacpan or  search on metacpan

T1.xs  view on Meta::CPAN

               const char *str;
               STRLEN len;
	       i_img_dim     cords[BOUNDING_BOX_COUNT];
               int i;
               int rc;
	     PPCODE:
               str = SvPV(str_sv, len);
#ifdef SvUTF8
               if (SvUTF8(str_sv))
                 utf8 = 1;
#endif

T1.xs  view on Meta::CPAN

        char const *text;
        STRLEN len;
        char *work;
        int count;
        int i;
      PPCODE:
        text = SvPV(text_sv, len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

T1.xs  view on Meta::CPAN

i_t1_face_name(font)
 Imager::Font::T1xs font
      PREINIT:
        char name[255];
        int len;
      PPCODE:
        len = i_t1_face_name(font, name, sizeof(name));
        if (len) {
          EXTEND(SP, 1);
          PUSHs(sv_2mortal(newSVpv(name, strlen(name))));
        }

T1.xs  view on Meta::CPAN

        char const *text;
        STRLEN work_len;
        size_t len;
        char name[255];
	SSize_t count = 0;
      PPCODE:
        text = SvPV(text_sv, work_len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

 view all matches for this distribution


Imager-Font-W32

 view release on metacpan or  search on metacpan

W32.xs  view on Meta::CPAN

      PREINIT:
	i_img_dim cords[BOUNDING_BOX_COUNT];
        int rc, i;
	char const *text;
         STRLEN text_len;
      PPCODE:
        text = SvPV(text_sv, text_len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

 view all matches for this distribution


Imager-zxing

 view release on metacpan or  search on metacpan

zxing.xs  view on Meta::CPAN

bool
ZXingDecoder::setFormats(std_string formats)

void
ZXingDecoder::decode(Imager im) const
  PPCODE:
    auto results = THIS->decode(im);
    EXTEND(SP, results.size());
    for (auto &&r : results) {
      auto pr = new ZXingDecoderResult(std::move(r));
      SV *sv_r = sv_newmortal();

zxing.xs  view on Meta::CPAN

std_string
ZXingDecoder::error() const

static void
ZXingDecoder::availFormats()
  PPCODE:
    const auto &v = ZXingDecoder::availFormats();
    EXTEND(SP, v.size());
    for (auto &f : v) {
      PUSHs(string_to_SV(f, SVs_TEMP));
    }

zxing.xs  view on Meta::CPAN

std_string
ZXingDecoderResult::contentType() const

void
ZXingDecoderResult::position() const
  PPCODE:
    auto pos = THIS->position();
    EXTEND(SP, 8);
    for (auto &f : pos) {
      PUSHs(sv_2mortal(newSViv(f.x)));
      PUSHs(sv_2mortal(newSViv(f.y)));

zxing.xs  view on Meta::CPAN

      XSRETURN_EMPTY;
    OUTPUT : RETVAL

static void
ZXingEncoder::availFormats()
  PPCODE:
    const auto &v = ZXingEncoder::availFormats();
    EXTEND(SP, v.size());
    for (auto &f : v) {
      PUSHs(string_to_SV(f, SVs_TEMP));
    }

 view all matches for this distribution


Imager

 view release on metacpan or  search on metacpan

FT2/FT2.xs  view on Meta::CPAN

        i_img_dim bbox[BOUNDING_BOX_COUNT];
        int i;
        char *text;
        STRLEN text_len;
        int rc;
      PPCODE:
        text = SvPV(text_sv, text_len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

FT2/FT2.xs  view on Meta::CPAN

      PREINIT:
        i_img_dim bbox[8];
        int i;
        const char *text;
	STRLEN len;
      PPCODE:
        text = SvPV(text_sv, len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

FT2/FT2.xs  view on Meta::CPAN

        i_img_dim x1
        i_img_dim x2
        i_img_dim x3
      PREINIT:
        i_img_dim box[4];
      PPCODE:
        box[0] = x0; box[1] = x1; box[2] = x2; box[3] = x3;
        ft2_transform_box(font, box);
          EXTEND(SP, 4);
          PUSHs(sv_2mortal(newSViv(box[0])));
          PUSHs(sv_2mortal(newSViv(box[1])));

FT2/FT2.xs  view on Meta::CPAN

        char *text;
        STRLEN len;
        char *work;
        size_t count;
        size_t i;
      PPCODE:
        text = SvPV(text_sv, len);
#ifdef SvUTF8
        if (SvUTF8(text_sv))
          utf8 = 1;
#endif

FT2/FT2.xs  view on Meta::CPAN

i_ft2_face_name(handle)
        Imager::Font::FT2x handle
      PREINIT:
        char name[255];
        size_t len;
      PPCODE:
        len = i_ft2_face_name(handle, name, sizeof(name));
        if (len) {
          EXTEND(SP, 1);
          PUSHs(sv_2mortal(newSVpv(name, 0)));
        }

FT2/FT2.xs  view on Meta::CPAN

        char const *text;
        STRLEN work_len;
        size_t len;
        char name[255];
	SSize_t count = 0;
      PPCODE:
        i_clear_error();
        text = SvPV(text_sv, work_len);
        len = work_len;
#ifdef SvUTF8
        if (SvUTF8(text_sv))

FT2/FT2.xs  view on Meta::CPAN

i_ft2_get_multiple_masters(handle)
        Imager::Font::FT2x handle
      PREINIT:
        i_font_mm mm;
        int i;
      PPCODE:
        if (i_ft2_get_multiple_masters(handle, &mm)) {
          EXTEND(SP, 2+mm.num_axis);
          PUSHs(sv_2mortal(newSViv(mm.num_axis)));
          PUSHs(sv_2mortal(newSViv(mm.num_designs)));
          for (i = 0; i < mm.num_axis; ++i) {

 view all matches for this distribution


Inline-ASM

 view release on metacpan or  search on metacpan

ASM.pm  view on Meta::CPAN


	if ($rtype eq 'void') {
	    print XS <<END;
	PREINIT:
	I32* temp;
	PPCODE:
	temp = PL_markstack_ptr++;
	$function($arg_name_list);
	if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
	  PL_markstack_ptr = temp;

 view all matches for this distribution


Inline-C

 view release on metacpan or  search on metacpan

lib/Inline/C.pm  view on Meta::CPAN

            if ($o->{CONFIG}{_TESTING}) {
                $XS .= <<END;
        PREINIT:
        PerlIO* stream;
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        $function($arg_name_list);
      stream = PerlIO_open(\"$dir/void_test\", \"a\");
      if (stream == NULL) warn(\"%s\\n\", \"Unable to open $dir/void_test for appending\");
        if (PL_markstack_ptr != temp) {

lib/Inline/C.pm  view on Meta::CPAN

            }
            else {
                $XS .= <<END;
        PREINIT:
        I32* temp;
        PPCODE:
        temp = PL_markstack_ptr++;
        $function($arg_name_list);
        if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = temp;

 view all matches for this distribution


Inline-Python

 view release on metacpan or  search on metacpan

Python.xs  view on Meta::CPAN

    PyObject *keys;
    int len;
    int i;
    AV* const functions = newAV();
    HV* const classes = newHV();
  PPCODE:
    mod = PyImport_AddModule(PYPKG);
    dict = PyModule_GetDict(mod);
    keys = PyMapping_Keys(dict);
    len = PyObject_Length(dict);

Python.xs  view on Meta::CPAN

    PyObject *globals;
    PyObject *locals;
    PyObject *py_result;
    int             context;
    SV*             ret = NULL;
  PPCODE:
    Printf(("py_eval: code: %s\n", str));
    /* doc:  if the module wasn't already loaded, you will get an empty
     * module object. */
    main_module = PyImport_AddModule("__main__");
    if(main_module == NULL) {

Python.xs  view on Meta::CPAN

    PyObject *py_retval = NULL;
    PyObject *tuple     = NULL;

    SV* ret = NULL;

  PPCODE:

    Printf(("py_call_function\n"));
    Printf(("package: %s\n", PYPKG));
    Printf(("function: %s\n", FNAME));

Python.xs  view on Meta::CPAN

    PyObject *py_retval = NULL;
    PyObject *tuple     = NULL;

    SV* ret = NULL;

  PPCODE:

    Printf(("py_call_function_ref\n"));

    if (!PyCallable_Check(func)) {
        croak("'%p' is not a callable object", func);

Python.xs  view on Meta::CPAN

    PyObject *py_retval; /* the return value */
    int i;
    int is_string;
    SV *ret;

  PPCODE:

    Printf(("eval_python_method\n"));

    if (SvROK(_inst) && SvTYPE(SvRV(_inst))==SVt_PVMG) {
        inst = (PyObject*)SvIV(SvRV(_inst));

Python.xs  view on Meta::CPAN


    PyObject *inst;
    char     *key_name;
    STRLEN   len;

  PPCODE:

    Printf(("get_object_data py_has_attr\n"));

    if (SvROK(_inst) && SvTYPE(SvRV(_inst))==SVt_PVMG) {
        inst = (PyObject*)SvIV(SvRV(_inst));

Python.xs  view on Meta::CPAN

    char     *key_name;
    STRLEN   len;
    PyObject *py_retval; /* the return value */
    SV       *ret;

  PPCODE:

    Printf(("get_object_data py_get_attr\n"));

    if (SvROK(_inst) && SvTYPE(SvRV(_inst))==SVt_PVMG) {
        inst = (PyObject*)SvIV(SvRV(_inst));

Python.xs  view on Meta::CPAN


    PyObject *inst, *py_value;
    char     *key_name;
    STRLEN   len;

  PPCODE:

    Printf(("set_attr\n"));

    if (SvROK(_inst) && SvTYPE(SvRV(_inst))==SVt_PVMG) {
        inst = (PyObject*)SvIV(SvRV(_inst));

Python.xs  view on Meta::CPAN

#undef  NUM_FIXED_ARGS
#define NUM_FIXED_ARGS 0

void
py_finalize()
  PPCODE:

    Py_Finalize();

    XSRETURN_EMPTY;

 view all matches for this distribution


Inline-Ruby

 view release on metacpan or  search on metacpan

Ruby.xs  view on Meta::CPAN

void
my_rb_eval(str)
	char*	str
    PREINIT:
	SV*	pl_retval;
    PPCODE:
	Printf(("About to evaluate some Ruby code:\n"));
        Printf(("%s\n", str));
        Printf(("__END__"));
#ifdef rb_set_errinfo
    rb_set_errinfo(Qnil); /* reset GET_THREAD()->errinfo */

Ruby.xs  view on Meta::CPAN

my_rb_call_function(FNAME, ...)
	char*	FNAME
    PREINIT:
	VALUE	argv;
	SV*	pl_retval;
    PPCODE:
	Printf(("rb_call_function(\"%s\")\n", FNAME));
	INIT_RUBY_ARGV(argv);
	pl_retval = call_ruby_method(Qnil, FNAME, NULL, argv);
#if defined CHECK_CONTEXT && defined FLATTEN_ARRAYS
	FLATTEN_RETVAL(pl_retval);

Ruby.xs  view on Meta::CPAN

	char*	mname
    PREINIT:
	VALUE	klass;
	VALUE	argv;
	SV*	pl_retval;
    PPCODE:
	Printf(("rb_call_class_method('%s', '%s', ...)\n",KLASS,mname));

	INIT_RUBY_ARGV(argv);
	klass = rb_str_new2(KLASS);
	pl_retval = call_ruby_method(klass, mname, NULL, argv);

Ruby.xs  view on Meta::CPAN

    PREINIT:
	VALUE	inst;
	VALUE	argv;
	SV*	pl_retval;
	SV*	iter;
    PPCODE:
	Printf(("rb_call_instance_method(%p, '%s', ...)\n",
		_inst, mname));

	if (isa_InlineRubyWrapper(_inst)) {
	    inst = UNWRAP_RUBY_OBJ(_inst);

 view all matches for this distribution


Inline-SLang

 view release on metacpan or  search on metacpan

SLang.xs  view on Meta::CPAN

    HV *hashref;
    AV *arrayref;
    char *name;
    int i, sflag;

  PPCODE:
    /* create the hash array to store the results in */
    hashref = (HV *) sv_2mortal( (SV *) newHV() );

    /*
     * assume that the max number of types is 256

SLang.xs  view on Meta::CPAN

    char *outname;
    char *slbuffer;
    size_t blen;
    int flag;

  PPCODE:
    /* not bothered anout 2 extra chars due to %s %s in format */
    blen = strlen(slformat)+2*strlen(inname);
    Newz( "", slbuffer, blen, char );
    snprintf( slbuffer, blen, slformat, inname, inname );

SLang.xs  view on Meta::CPAN

    SV * item
  PREINIT:
    SLtype sltype;
    int slflag;
    SV * out;
  PPCODE:
    sltype = pltype( item, &slflag );

    switch( sltype ) {
      case SLANG_NULL_TYPE:     out = newSVpv( "Null_Type", 0 ); break;
      case SLANG_INT_TYPE:      out = newSVpv( "Integer_Type", 0 ); break;

SLang.xs  view on Meta::CPAN

  PREINIT:
    int dims[SLARRAY_MAX_DIMS];
    AV *aref;
    SV * out;
    int i, ndim;
  PPCODE:
    aref = (AV *) SvRV( in );
    ndim = 1 + av_len(aref);
    Printf( ("Creating an empty array (%d dim) with size ", ndim) );
    for( i = 0; i < ndim; i++ ) {
      int dsize = SvIV( *av_fetch( aref, i, 0 ) );

SLang.xs  view on Meta::CPAN


void
_sl_eval( str )
    char * str

  PPCODE:
    Printf( ("----------------------------------------------------------------------\n") );
    Printf( ("sl_eval: code: %s\n", str ) );
    Printf( ("----------------------------------------------------------------------\n") );

    /*

SLang.xs  view on Meta::CPAN

    char * qualname

  PREINIT:
    int i;

  PPCODE:
    Printf( ("sl_call_function called:\n  function: %s\n", qualname ) );

    /*
     * We could remove this check - ie assume that if we've got this
     * far then eveything 'should' be fine

 view all matches for this distribution


Inline-Struct

 view release on metacpan or  search on metacpan

lib/Inline/Struct.pm  view on Meta::CPAN

$field(object, ...)
	$cname *object
    PREINIT:
	SV *retval = newSViv(0);
	int mortalise_retval = 0;
    PPCODE:
	ENTER;
	SAVETMPS;
	if (items == 1) {
	    @{[typeconv($o, "object->$field", "retval", $type, "output_expr", undef, $field)]}
	    @{[

 view all matches for this distribution


Inline-Tcl

 view release on metacpan or  search on metacpan

Tcl.xs  view on Meta::CPAN

    Tcl_Obj *listPtr, *elemObjPtr;
    Tcl_Obj **objvPtr;
    char *result;
    int objc,i;
    AV* functions = newAV();
 PPCODE:
    /*
     * Get the pattern and find the "effective namespace" in which to
     * list commands.
     */

Tcl.xs  view on Meta::CPAN

  char *result;
  SV* ret = NULL;
  char *command;
  int cmdlen;
  int len;
  PPCODE:

  cmdlen = 0;

  for (i=1; i<items; i++) {
    result = Pl2Tcl(ST(i));

 view all matches for this distribution


InlineX-C2XS

 view release on metacpan or  search on metacpan

expected_c.txt  view on Meta::CPAN

void
DESTROY (obj)
	SV *	obj
	PREINIT:
	I32* temp;
	PPCODE:
	temp = PL_markstack_ptr++;
	DESTROY(obj);
	if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
	  PL_markstack_ptr = temp;

expected_c.txt  view on Meta::CPAN

	SV *	obj
	char *	filename
	int	want_hole
	PREINIT:
	I32* temp;
	PPCODE:
	temp = PL_markstack_ptr++;
	to_file(obj, filename, want_hole);
	if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
	  PL_markstack_ptr = temp;

expected_c.txt  view on Meta::CPAN

	SV *	obj
	SV *	pg
	int	hole
	PREINIT:
	I32* temp;
	PPCODE:
	temp = PL_markstack_ptr++;
	remove_add_polygon(obj, pg, hole);
	if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
	  PL_markstack_ptr = temp;

expected_c.txt  view on Meta::CPAN

void
get_polygons (obj)
	SV *	obj
	PREINIT:
	I32* temp;
	PPCODE:
	temp = PL_markstack_ptr++;
	get_polygons(obj);
	if (PL_markstack_ptr != temp) {
          /* truly void, because dXSARGS not invoked */
	  PL_markstack_ptr = temp;

 view all matches for this distribution


InlineX-CPP2XS

 view release on metacpan or  search on metacpan

demos/cpp/Inherit.xs  view on Meta::CPAN

void
Foo::set_secret(s)
	int	s
    PREINIT:
	I32 *	__temp_markstack_ptr;
    PPCODE:
	__temp_markstack_ptr = PL_markstack_ptr++;
	THIS->set_secret(s);
        if (PL_markstack_ptr != __temp_markstack_ptr) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = __temp_markstack_ptr;

demos/cpp/Inherit.xs  view on Meta::CPAN

void
Bar::set_secret(s)
	int	s
    PREINIT:
	I32 *	__temp_markstack_ptr;
    PPCODE:
	__temp_markstack_ptr = PL_markstack_ptr++;
	THIS->set_secret(s);
        if (PL_markstack_ptr != __temp_markstack_ptr) {
          /* truly void, because dXSARGS not invoked */
          PL_markstack_ptr = __temp_markstack_ptr;

 view all matches for this distribution


Internals

 view release on metacpan or  search on metacpan

Internals.xs  view on Meta::CPAN



void
IsWriteProtected(ref)
SV *	ref
PPCODE:
{
    SV *obj;

    if ( INTERNALS_REFERENCE(ref,obj) )
    {

Internals.xs  view on Meta::CPAN



void
SetReadOnly(ref)
SV *	ref
PPCODE:
{
    SV *obj;

    if ( INTERNALS_REFERENCE(ref,obj) )
    {

Internals.xs  view on Meta::CPAN



void
SetReadWrite(ref)
SV *	ref
PPCODE:
{
    SV *obj;

    if ( INTERNALS_REFERENCE(ref,obj) )
    {

Internals.xs  view on Meta::CPAN



void
GetRefCount(ref)
SV *	ref
PPCODE:
{
    SV *obj;

    if ( INTERNALS_REFERENCE(ref,obj) )
    {

Internals.xs  view on Meta::CPAN


void
SetRefCount(ref,val)
SV *	ref
SV *	val
PPCODE:
{
    SV *obj;
    U32 cnt;

    if ( INTERNALS_REFERENCE(ref,obj) )

 view all matches for this distribution


Isam

 view release on metacpan or  search on metacpan

Isam.xs  view on Meta::CPAN

isisaminfo1(fd)
	int	fd
	PREINIT:
	struct dictinfo di;
	int cc;
	PPCODE:
	cc = isindexinfo(fd,&di,0);
	EXTEND(SP, 5);
   	PUSHs(sv_2mortal(newSViv(cc)));
   	PUSHs(sv_2mortal(newSViv(di.di_nkeys)));
   	PUSHs(sv_2mortal(newSViv(di.di_recsize)));

Isam.xs  view on Meta::CPAN

	int	idx
	PREINIT:
	struct keydesc kd;
	int cc;
	int i, j;
	PPCODE:
	cc = isindexinfo(fd,&kd,idx);
	EXTEND(SP,1+2+3*kd.k_nparts);
	PUSHs(sv_2mortal(newSViv(cc))); 
	PUSHs(sv_2mortal(newSViv(kd.k_flags)));
	PUSHs(sv_2mortal(newSViv(kd.k_nparts))); 

 view all matches for this distribution


JCM-Net-Patricia

 view release on metacpan or  search on metacpan

Patricia.xs  view on Meta::CPAN

	SV *				data
	PROTOTYPE: $$$$$
	PREINIT:
	   	prefix_t prefix;
	   	JCM__Net__PatriciaNode node;
	PPCODE:
		Fill_Prefix(prefix, family, addr, bits, tree->maxbits);
	   	node = patricia_lookup(tree, &prefix);
		if (NULL != node) {
		   /* { */
		   if (node->data) {

Patricia.xs  view on Meta::CPAN

	int				bits
	PROTOTYPE: $$$$
	PREINIT:
	   	prefix_t prefix;
	   	JCM__Net__PatriciaNode node;
	PPCODE:
		Fill_Prefix(prefix, family, addr, bits, tree->maxbits);
		node = patricia_search_best(tree, &prefix);
		if (NULL != node) {
		   XPUSHs((SV *)node->data);
		} else {

Patricia.xs  view on Meta::CPAN

	int				bits
	PROTOTYPE: $$$$
	PREINIT:
	   	prefix_t prefix;
	   	JCM__Net__PatriciaNode node;
	PPCODE:
		Fill_Prefix(prefix, family, addr, bits, tree->maxbits);
		node = patricia_search_best(tree, &prefix);
		if (NULL != node) {
                   if (node->prefix->family == AF_INET) {
                       XPUSHs(sv_2mortal(

Patricia.xs  view on Meta::CPAN

	int				bits
	PROTOTYPE: $$$$
	PREINIT:
	   	prefix_t prefix;
	   	JCM__Net__PatriciaNode node;
	PPCODE:
		Fill_Prefix(prefix, family, addr, bits, tree->maxbits);
		node = patricia_search_exact(tree, &prefix);
		if (NULL != node) {
		   XPUSHs((SV *)node->data);
		} else {

Patricia.xs  view on Meta::CPAN

	int				bits
	PROTOTYPE: $$$$
	PREINIT:
	   	prefix_t prefix;
	   	JCM__Net__PatriciaNode node;
	PPCODE:
		Fill_Prefix(prefix, family, addr, bits, tree->maxbits);
	   	node = patricia_search_exact(tree, &prefix);
		if (NULL != node) {
		   XPUSHs(sv_mortalcopy((SV *)node->data));
		   deref_data(node->data);

Patricia.xs  view on Meta::CPAN

		patricia_node_t *node = NULL;
		struct frozen_header frozen_header;
		struct frozen_node *frozen_nodes, *frozen_node;
		size_t n = 0, i = 0, nd = 0;
		SV *frozen_patricia;
	PPCODE:
		if (SvTRUE(cloning))
		  XSRETURN_UNDEF;

		/* I do not know enough of patricia.c to
		 * decide whether inactive nodes can

Patricia.xs  view on Meta::CPAN

		struct frozen_node *frozen_node;
		struct _patricia_tree_t *tree;
		patricia_node_t *node = NULL, *child, **fixup;
		int n, n_calculated, i, d_index, l_index, r_index;
		STRLEN len;
	PPCODE:
		if (SvTRUE(cloning))
		    XSRETURN_UNDEF;

		tree = calloc(1, sizeof(*tree));
		frozen_patricia = (struct frozen_patricia*)SvPV(serialized, len);

 view all matches for this distribution


JSON-SIMD

 view release on metacpan or  search on metacpan

SIMD.xs  view on Meta::CPAN

        bool_stash = 0;
        bool_false = 0;
        bool_true  = 0;

void new (char *klass)
	PPCODE:
{
	SV *pv = NEWSV (0, sizeof (JSON));
        SvPOK_only (pv);
        json_init ((JSON *)SvPVX (pv));
        XPUSHs (sv_2mortal (sv_bless (

SIMD.xs  view on Meta::CPAN

           strEQ (klass, "JSON::SIMD") ? JSON_STASH : gv_stashpv (klass, 1)
        )));
}

void boolean_values (JSON *self, SV *v_false = 0, SV *v_true = 0)
	PPCODE:
        self->flags   &= ~F_CORE_BOOLS;
        self->v_false = newSVsv (v_false);
        self->v_true  = newSVsv (v_true);
        XPUSHs (ST (0));

void get_boolean_values (JSON *self)
	PPCODE:
        if (self->v_false && self->v_true)
          {
            EXTEND (SP, 2);
            PUSHs (self->v_false);
            PUSHs (self->v_true);
          }

void core_bools (JSON *self, int enable = 1)
	PPCODE:
        if (enable)
          {
            self->flags   |= F_CORE_BOOLS;
            self->v_false = newSVsv (&PL_sv_no);
            self->v_true  = newSVsv (&PL_sv_yes);

SIMD.xs  view on Meta::CPAN

            self->v_true  = 0;
          }
        XPUSHs (ST (0));

void get_core_bools (JSON *self)
	PPCODE:
{
        int result = self->flags & F_CORE_BOOLS;
#if PERL_VERSION_GE(5,36,0)
        if (self->v_false && self->v_true && SvIsBOOL(self->v_false) && SvIsBOOL(self->v_true))
          {

SIMD.xs  view on Meta::CPAN

        relaxed           = F_RELAXED
        allow_unknown     = F_ALLOW_UNKNOWN
        allow_tags        = F_ALLOW_TAGS
        use_simdjson      = F_USE_SIMDJSON
        encode_core_bools = F_ENCODE_CORE_BOOLS
	PPCODE:
{
        if (enable)
          self->flags |=  ix;
        else
          self->flags &= ~ix;

SIMD.xs  view on Meta::CPAN

        get_relaxed           = F_RELAXED
        get_allow_unknown     = F_ALLOW_UNKNOWN
        get_allow_tags        = F_ALLOW_TAGS
        get_use_simdjson      = F_USE_SIMDJSON
        get_encode_core_bools = F_ENCODE_CORE_BOOLS
	PPCODE:
        XPUSHs (boolSV (self->flags & ix));

void max_depth (JSON *self, U32 max_depth = 0x80000000UL)
	PPCODE:
        self->max_depth = max_depth;
        XPUSHs (ST (0));

U32 get_max_depth (JSON *self)
	CODE:
        RETVAL = self->max_depth;
	OUTPUT:
        RETVAL

void max_size (JSON *self, U32 max_size = 0)
	PPCODE:
        self->max_size = max_size;
        XPUSHs (ST (0));

int get_max_size (JSON *self)
	CODE:
        RETVAL = self->max_size;
	OUTPUT:
        RETVAL

void filter_json_object (JSON *self, SV *cb = &PL_sv_undef)
	PPCODE:
{
        SvREFCNT_dec (self->cb_object);
        self->cb_object = SvOK (cb) ? newSVsv (cb) : 0;

        XPUSHs (ST (0));
}

void filter_json_single_key_object (JSON *self, SV *key, SV *cb = &PL_sv_undef)
	PPCODE:
{
	if (!self->cb_sk_object)
          self->cb_sk_object = newHV ();

        if (SvOK (cb))

SIMD.xs  view on Meta::CPAN


        XPUSHs (ST (0));
}

void encode (JSON *self, SV *scalar)
	PPCODE:
        PUTBACK; scalar = encode_json (scalar, self); SPAGAIN;
        XPUSHs (scalar);

void decode (JSON *self, SV *jsonstr)
	PPCODE:
        PUTBACK; jsonstr = decode_json (jsonstr, self, 0, 0); SPAGAIN;
        XPUSHs (jsonstr);

void decode_prefix (JSON *self, SV *jsonstr)
	PPCODE:
{
	SV *sv;
        STRLEN offset;
        PUTBACK; sv = decode_json (jsonstr, self, &offset, 0); SPAGAIN;
        EXTEND (SP, 2);
        PUSHs (sv);
        PUSHs (sv_2mortal (newSVuv (ptr_to_index (jsonstr, SvPV_nolen (jsonstr) + offset))));
}

void decode_at_pointer (JSON *self, SV *jsonstr, SV *path)
	PPCODE:
        PUTBACK; jsonstr = decode_json (jsonstr, self, 0, path); SPAGAIN;
        XPUSHs (jsonstr);

void incr_parse (JSON *self, SV *jsonstr = 0)
	PPCODE:
{
	if (!self->incr_text)
          self->incr_text = newSVpvn ("", 0);

        /* if utf8-ness doesn't match the decoder, need to upgrade/downgrade */

SIMD.xs  view on Meta::CPAN

        SvREFCNT_dec (self->incr_text);

PROTOTYPES: ENABLE

void encode_json (SV *scalar)
	PPCODE:
{
        JSON json;
        json_init (&json);
        json.flags |= F_UTF8;
        PUTBACK; scalar = encode_json (scalar, &json); SPAGAIN;
        XPUSHs (scalar);
}

void decode_json (SV *jsonstr)
	PPCODE:
{
        JSON json;
        json_init (&json);
        json.flags |= F_UTF8;
        PUTBACK; jsonstr = decode_json (jsonstr, &json, 0, 0); SPAGAIN;
        XPUSHs (jsonstr);
}

void simdjson_version ()
	PPCODE:
{
        SV *version_info;
        PUTBACK; version_info = simdjson_get_version(); SPAGAIN;
        XPUSHs (version_info);
}

void is_core_bool (SV *scalar)
	PPCODE:
{
#if PERL_VERSION_GE(5,36,0)
        XPUSHs( boolSV( SvIsBOOL( scalar )));
#else
        XPUSHs( boolSV( 0 ));

 view all matches for this distribution


JSON-SL

 view release on metacpan or  search on metacpan

SL.xs  view on Meta::CPAN

    OUTPUT: RETVAL


void
PLJSONSL_set_jsonpointer(PLJSONSL *pjsn, AV *paths)
    PPCODE:
    pljsonsl_set_jsonpointer(pjsn, paths);

SV *
PLJSONSL_root(PLJSONSL *pjsn)
    CODE:

SL.xs  view on Meta::CPAN

void
PLJSONSL_feed(PLJSONSL *pjsn, SV *input)
    ALIAS:
    incr_parse =1

    PPCODE:
    {
    dRESULT_VARS;
    pljsonsl_feed_incr(pjsn, input);
    RETURN_RESULTS(pjsn);
    }

void
PLJSONSL_fetch(PLJSONSL *pjsn)
    PPCODE:
    {
    dRESULT_VARS;
    RETURN_RESULTS(pjsn);
    }

SL.xs  view on Meta::CPAN

PLJSONSL_decode_json(SV *input)
    PREINIT:
    PLJSONSL* pjsn;
    dRESULT_VARS;

    PPCODE:
    pjsn = pljsonsl_get_and_initialize_global(aTHX);
    pljsonsl_feed_oneshot(pjsn, input);

    pjsn->curhk = NULL;
    pjsn->keep_pos = 0;

 view all matches for this distribution


JSON-XS-ByteString

 view release on metacpan or  search on metacpan

ByteString.xs  view on Meta::CPAN


MODULE = JSON::XS::ByteString		PACKAGE = JSON::XS::ByteString		

void
encode_json(SV * data)
    PPCODE:
        visited_p = 0;
        STRLEN need_size = estimate_normal(data);
        SV * out_sv = sv_2mortal(newSV(need_size));
        SvPOK_only(out_sv);
        visited_p = 0;

ByteString.xs  view on Meta::CPAN

        *SvEND(out_sv) = 0;
        PUSHs(out_sv);

void
encode_json_unblessed(SV * data)
    PPCODE:
        visited_p = 0;
        STRLEN need_size = estimate_unblessed(data);
        SV * out_sv = sv_2mortal(newSV(need_size));
        SvPOK_only(out_sv);
        visited_p = 0;

ByteString.xs  view on Meta::CPAN

        *SvEND(out_sv) = 0;
        PUSHs(out_sv);

void
decode_json(SV * json)
    PPCODE:
        unsigned char *str, *str_end, *str_adv;
        STRLEN len;
        SV * out = NULL;
        str = (unsigned char*) SvPV(json, len);
        str_end = str + len;

ByteString.xs  view on Meta::CPAN

        else
            PUSHs(sv_2mortal(out));

void
decode_json_safe(SV * json)
    PPCODE:
        unsigned char *str, *str_end, *str_adv;
        STRLEN len;
        SV * out = NULL;
        str = (unsigned char*) SvPV(json, len);
        str_end = str + len;

 view all matches for this distribution


JSON-XS

 view release on metacpan or  search on metacpan

XS.xs  view on Meta::CPAN

        bool_stash = 0;
        bool_false = 0;
        bool_true  = 0;

void new (char *klass)
	PPCODE:
{
	SV *pv = NEWSV (0, sizeof (JSON));
        SvPOK_only (pv);
        json_init ((JSON *)SvPVX (pv));
        XPUSHs (sv_2mortal (sv_bless (

XS.xs  view on Meta::CPAN

           strEQ (klass, "JSON::XS") ? JSON_STASH : gv_stashpv (klass, 1)
        )));
}

void boolean_values (JSON *self, SV *v_false = 0, SV *v_true = 0)
	PPCODE:
	self->v_false = newSVsv (v_false);
	self->v_true  = newSVsv (v_true);
        XPUSHs (ST (0));

void get_boolean_values (JSON *self)
	PPCODE:
        if (self->v_false && self->v_true)
	  {
            EXTEND (SP, 2);
            PUSHs (self->v_false);
            PUSHs (self->v_true);

XS.xs  view on Meta::CPAN

        allow_blessed   = F_ALLOW_BLESSED
        convert_blessed = F_CONV_BLESSED
        relaxed         = F_RELAXED
        allow_unknown   = F_ALLOW_UNKNOWN
        allow_tags      = F_ALLOW_TAGS
	PPCODE:
{
        if (enable)
          self->flags |=  ix;
        else
          self->flags &= ~ix;

XS.xs  view on Meta::CPAN

        get_allow_blessed   = F_ALLOW_BLESSED
        get_convert_blessed = F_CONV_BLESSED
        get_relaxed         = F_RELAXED
        get_allow_unknown   = F_ALLOW_UNKNOWN
        get_allow_tags      = F_ALLOW_TAGS
	PPCODE:
        XPUSHs (boolSV (self->flags & ix));

void max_depth (JSON *self, U32 max_depth = 0x80000000UL)
	PPCODE:
        self->max_depth = max_depth;
        XPUSHs (ST (0));

U32 get_max_depth (JSON *self)
	CODE:
        RETVAL = self->max_depth;
	OUTPUT:
        RETVAL

void max_size (JSON *self, U32 max_size = 0)
	PPCODE:
        self->max_size = max_size;
        XPUSHs (ST (0));

int get_max_size (JSON *self)
	CODE:
        RETVAL = self->max_size;
	OUTPUT:
        RETVAL

void filter_json_object (JSON *self, SV *cb = &PL_sv_undef)
	PPCODE:
{
        SvREFCNT_dec (self->cb_object);
        self->cb_object = SvOK (cb) ? newSVsv (cb) : 0;

        XPUSHs (ST (0));
}

void filter_json_single_key_object (JSON *self, SV *key, SV *cb = &PL_sv_undef)
	PPCODE:
{
	if (!self->cb_sk_object)
          self->cb_sk_object = newHV ();

        if (SvOK (cb))

XS.xs  view on Meta::CPAN


        XPUSHs (ST (0));
}

void encode (JSON *self, SV *scalar)
	PPCODE:
        PUTBACK; scalar = encode_json (scalar, self); SPAGAIN;
        XPUSHs (scalar);

void decode (JSON *self, SV *jsonstr)
	PPCODE:
        PUTBACK; jsonstr = decode_json (jsonstr, self, 0); SPAGAIN;
        XPUSHs (jsonstr);

void decode_prefix (JSON *self, SV *jsonstr)
	PPCODE:
{
	SV *sv;
        STRLEN offset;
        PUTBACK; sv = decode_json (jsonstr, self, &offset); SPAGAIN;
        EXTEND (SP, 2);
        PUSHs (sv);
        PUSHs (sv_2mortal (newSVuv (ptr_to_index (jsonstr, SvPV_nolen (jsonstr) + offset))));
}

void incr_parse (JSON *self, SV *jsonstr = 0)
	PPCODE:
{
	if (!self->incr_text)
          self->incr_text = newSVpvn ("", 0);

        /* if utf8-ness doesn't match the decoder, need to upgrade/downgrade */

XS.xs  view on Meta::CPAN

        SvREFCNT_dec (self->incr_text);

PROTOTYPES: ENABLE

void encode_json (SV *scalar)
	PPCODE:
{
        JSON json;
        json_init (&json);
        json.flags |= F_UTF8;
        PUTBACK; scalar = encode_json (scalar, &json); SPAGAIN;
        XPUSHs (scalar);
}

void decode_json (SV *jsonstr)
	PPCODE:
{
        JSON json;
        json_init (&json);
        json.flags |= F_UTF8;
        PUTBACK; jsonstr = decode_json (jsonstr, &json, 0); SPAGAIN;

 view all matches for this distribution


JSPL

 view release on metacpan or  search on metacpan

JS.xs  view on Meta::CPAN

	RETVAL
	
void
jsvisitor(sv)
    SV *sv
    PPCODE:
	if(SvOK(sv) && SvROK(sv) && (sv = SvRV(sv)) && SvMAGICAL(sv)) {
	    MAGIC *mg = mg_find(sv, PERL_MAGIC_jsvis);
	    while(mg) {
		if(mg->mg_type == PERL_MAGIC_jsvis && mg->mg_private == 0x4a53) {
		    jsv_mg *jsvis = (jsv_mg *)mg->mg_ptr;

 view all matches for this distribution


( run in 1.844 second using v1.01-cache-2.11-cpan-5511b514fd6 )