Should never malloc SDL_Pallete
Kartik Thakore [Mon, 26 Oct 2009 00:26:14 +0000 (20:26 -0400)]
src/SDL.xs
typemap

index aadfd96..50e286a 100644 (file)
@@ -1210,6 +1210,7 @@ ListModes ( format, flags )
                }
        OUTPUT:
                RETVAL
+=skip
 
 SDL_Palette *
 NewPalette ( number )
@@ -1221,6 +1222,7 @@ NewPalette ( number )
                RETVAL->ncolors = number;
        OUTPUT:
                RETVAL
+=cut
 
 int
 PaletteNColors ( palette, ... )
diff --git a/typemap b/typemap
index b39c5d5..7b13f87 100644 (file)
--- a/typemap
+++ b/typemap
@@ -21,7 +21,7 @@ SDL_CDtrack *         T_PTR
 SDL_TimerCallback      T_PTR
 SDL_Rect *             O_OBJECT
 SDL_Color *            O_OBJECT
-SDL_Palette *          T_PTR
+SDL_Palette *          O_OBJECT
 SDL_PixelFormat *      O_OBJECT
 SDL_VideoInfo *                O_OBJECT
 SDL_Cursor *           T_PTR