X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=typemap;h=12a35fa02421e0d01e62a8e44be36a5d7140327f;hb=6fc151b2d63f20f6e3d4af4d328227a3702df9ea;hp=410e97357db5ab5293e99131b1881afd4e66ed4e;hpb=4db254ced364403ceacdc65192d8f7ccfe63278b;p=sdlgit%2FSDL_perl.git diff --git a/typemap b/typemap index 410e973..12a35fa 100644 --- a/typemap +++ b/typemap @@ -2,6 +2,7 @@ TYPEMAP const Uint16 * T_PTR Uint8 T_U_CHAR Uint8 * T_PTR +const Uint8* T_PTR Uint8 ** T_PTR Uint16 T_UV Uint16 * T_PTR @@ -18,7 +19,7 @@ SDL_SysWMmsg * T_PTR SDL_CD * T_PTR SDL_CDtrack * T_PTR SDL_TimerCallback T_PTR -SDL_Rect * T_PTR +SDL_Rect * O_OBJECT SDL_Color * T_PTR SDL_Palette * T_PTR SDL_PixelFormat * T_PTR @@ -51,17 +52,40 @@ GLbitfield T_IV GLenum T_IV ConsoleInformation * T_PTR GLboolean T_U_CHAR +GLUquadric * T_PTR +GLdouble T_NV GLUnurbsObj * T_PTR GLUtesselator * T_PTR GLuint T_UV +GLuint* T_PTR GLint T_IV GLint* T_PTR float * T_PTR float T_NV GLfloat T_NV -GLUquadric * T_PTR -GLdouble T_NV Sound_DecoderInfo * T_PTR const Sound_DecoderInfo * T_PTR Sound_Sample * T_PTR Sound_AudioInfo * T_PTR +SDL_RWops* T_PTR +SDL_svg_context* T_PTR + +OUTPUT + +# The Perl object is blessed into 'CLASS', which should be a +# char* having the name of the package for the blessing. +O_OBJECT + sv_setref_pv( $arg, CLASS, (void*)$var ); + + +INPUT + +O_OBJECT + if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) + $var = ($type)SvIV((SV*)SvRV( $arg )); + else{ + warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); + XSRETURN_UNDEF; + } + +