2 * This file was generated automatically by ExtUtils::ParseXS version 2.2002 from the
3 * contents of Rect.xs. Do not edit this file, edit Rect.xs instead.
5 * ANY CHANGES MADE HERE WILL BE LOST!
23 #ifndef PERL_UNUSED_VAR
24 # define PERL_UNUSED_VAR(var) if (0) var = var
27 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
28 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
30 /* prototype to pass -Wmissing-prototypes */
32 S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
35 S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
37 const GV *const gv = CvGV(cv);
39 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
42 const char *const gvname = GvNAME(gv);
43 const HV *const stash = GvSTASH(gv);
44 const char *const hvname = stash ? HvNAME(stash) : NULL;
47 Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
49 Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
51 /* Pants. I don't think that it should be possible to get here. */
52 Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
55 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
57 #ifdef PERL_IMPLICIT_CONTEXT
58 #define croak_xs_usage(a,b) S_croak_xs_usage(aTHX_ a,b)
60 #define croak_xs_usage S_croak_xs_usage
67 XS(XS_Rect_NewRect); /* prototype to pass -Wmissing-prototypes */
76 croak_xs_usage(cv, "x, y, w, h");
78 Sint16 x = (Sint16)SvIV(ST(0));
79 Sint16 y = (Sint16)SvIV(ST(1));
80 Uint16 w = (Uint16)SvUV(ST(2));
81 Uint16 h = (Uint16)SvUV(ST(3));
84 RETVAL = (SDL_Rect *) safemalloc (sizeof(SDL_Rect));
90 ST(0) = sv_newmortal();
91 sv_setref_pv(ST(0), "SDL_RectPtr", (void*)RETVAL);
97 XS(XS_Rect_RectX); /* prototype to pass -Wmissing-prototypes */
106 croak_xs_usage(cv, "rect, ...");
112 if (sv_derived_from(ST(0), "SDL_RectPtr")) {
113 IV tmp = SvIV((SV*)SvRV(ST(0)));
114 rect = INT2PTR(SDL_Rect *,tmp);
117 Perl_croak(aTHX_ "%s: %s is not of type %s",
119 "rect", "SDL_RectPtr");
121 if (items > 1 ) rect->x = SvIV(ST(1));
124 XSprePUSH; PUSHi((IV)RETVAL);
130 XS(XS_Rect_RectY); /* prototype to pass -Wmissing-prototypes */
139 croak_xs_usage(cv, "rect, ...");
145 if (sv_derived_from(ST(0), "SDL_RectPtr")) {
146 IV tmp = SvIV((SV*)SvRV(ST(0)));
147 rect = INT2PTR(SDL_Rect *,tmp);
150 Perl_croak(aTHX_ "%s: %s is not of type %s",
152 "rect", "SDL_RectPtr");
154 if (items > 1 ) rect->y = SvIV(ST(1));
157 XSprePUSH; PUSHi((IV)RETVAL);
163 XS(XS_Rect_RectW); /* prototype to pass -Wmissing-prototypes */
172 croak_xs_usage(cv, "rect, ...");
178 if (sv_derived_from(ST(0), "SDL_RectPtr")) {
179 IV tmp = SvIV((SV*)SvRV(ST(0)));
180 rect = INT2PTR(SDL_Rect *,tmp);
183 Perl_croak(aTHX_ "%s: %s is not of type %s",
185 "rect", "SDL_RectPtr");
187 if (items > 1 ) rect->w = SvIV(ST(1));
190 XSprePUSH; PUSHu((UV)RETVAL);
196 XS(XS_Rect_RectH); /* prototype to pass -Wmissing-prototypes */
205 croak_xs_usage(cv, "rect, ...");
211 if (sv_derived_from(ST(0), "SDL_RectPtr")) {
212 IV tmp = SvIV((SV*)SvRV(ST(0)));
213 rect = INT2PTR(SDL_Rect *,tmp);
216 Perl_croak(aTHX_ "%s: %s is not of type %s",
218 "rect", "SDL_RectPtr");
220 if (items > 1 ) rect->h = SvIV(ST(1));
223 XSprePUSH; PUSHu((UV)RETVAL);
229 XS(XS_SDL_RectPtr_DESTROY); /* prototype to pass -Wmissing-prototypes */
230 XS(XS_SDL_RectPtr_DESTROY)
238 croak_xs_usage(cv, "rect");
243 IV tmp = SvIV((SV*)SvRV(ST(0)));
244 rect = INT2PTR(SDL_Rect *,tmp);
247 Perl_croak(aTHX_ "%s: %s is not a reference",
248 "SDL_RectPtr::DESTROY",
251 printf("RectPtr::DESTROY\n");
261 XS(boot_Rect); /* prototype to pass -Wmissing-prototypes */
269 const char* file = __FILE__;
271 PERL_UNUSED_VAR(cv); /* -W */
272 PERL_UNUSED_VAR(items); /* -W */
273 XS_VERSION_BOOTCHECK ;
275 newXS("Rect::NewRect", XS_Rect_NewRect, file);
276 newXS("Rect::RectX", XS_Rect_RectX, file);
277 newXS("Rect::RectY", XS_Rect_RectY, file);
278 newXS("Rect::RectW", XS_Rect_RectW, file);
279 newXS("Rect::RectH", XS_Rect_RectH, file);
280 newXS("SDL_RectPtr::DESTROY", XS_SDL_RectPtr_DESTROY, file);
282 call_list(PL_scopestack_ix, PL_unitcheckav);