I think a part of my soul died when I had to cast a const foo * to a foo * :(
Kartik Thakore [Fri, 23 Oct 2009 19:39:16 +0000 (15:39 -0400)]
src/Core/Video.xs

index 3c964e7..b0f9d2b 100644 (file)
@@ -35,21 +35,21 @@ video_get_video_info()
        PREINIT:
                char* CLASS = "SDL::VideoInfo";
        CODE:
-               RETVAL = SDL_GetVideoInfo;
+               RETVAL = (SDL_VideoInfo *) SDL_GetVideoInfo();
 
        OUTPUT:
-       RETVAL
+               RETVAL
 
 char *
 video_video_driver_name( maxlen )
        int maxlen
        CODE:
-               char* buffer = safemalloc( sizeof(char) * maxlen); 
+               char* buffer = safemalloc(sizeof(char) * maxlen);
                char* str = SvPV( newSVpvn( buffer , maxlen), maxlen );
 
-               RETVAL = SDL_VideoDriverName( str , maxlen);
-
-               sv_2mortal(buffer);             
+               RETVAL = (char* )SDL_VideoDriverName( str , maxlen);
+               sv_2mortal(buffer);
+               sv_2mortal(str);                
                
        OUTPUT:
                RETVAL