Graphics-Raylib
view release on metacpan or search on metacpan
LoadImageFromAV_transposed_uninitialized_mem = 3
INIT:
int i;
AV *av;
Color *pixels;
Image img;
int literal_color = 0;
int currwidth = 0;
IntRectangle where = { 0, 0, 0, 0 };
ImageSet_t *my_ImageSet = ImageSet;
PPCODE:
if (!SvROK(array_ref) || SvTYPE(SvRV(array_ref)) != SVt_PVAV)
croak("expected ARRAY ref as first argument");
literal_color = !SvOK(color_cb);
if (!literal_color && (!SvROK(color_cb) || SvTYPE(SvRV(color_cb)) != SVt_PVCV))
croak("expected CODE ref as second argument");
av = (AV*)SvRV(array_ref);
where.height = av_len(av) + 1;
for (i = 0; i < where.height; i++) {
SV** row_sv = av_fetch(av, i, 0);
XS/fallback/const-xs.inc view on Meta::CPAN
dTARGET;
#endif
STRLEN len;
int type;
IV iv = 0; /* avoid uninit var warning */
/* 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 */
switch (type) {
case PERL_constant_NOTFOUND:
sv =
sv_2mortal(newSVpvf("%s is not a valid Graphics::Raylib::XS macro", s));
PUSHs(sv);
( run in 0.586 second using v1.01-cache-2.11-cpan-5511b514fd6 )