Fixed test. But the returned value for the fuction SDL::TTFSizeUTF8 seems weird
Kartik Thakore [Sun, 23 Aug 2009 15:59:56 +0000 (11:59 -0400)]
src/SDL.xs
t/toolfontpm.t

index 3ebfcf8..5f73b68 100644 (file)
@@ -2993,8 +2993,11 @@ TTFSizeUTF8 ( font, text )
                int w,h;
                RETVAL = newAV();
                TTF_SizeUTF8(font,text,&w,&h);
-               av_push(RETVAL,newSViv(w));
-               av_push(RETVAL,newSViv(h));
+                       av_push(RETVAL,newSViv(w));
+                       av_push(RETVAL,newSViv(h));
+               
+               sv_2mortal((SV*)RETVAL);
+               
        OUTPUT:
                RETVAL
 
index 6bdcf6b..5464c69 100644 (file)
@@ -38,7 +38,6 @@ BEGIN {
 use strict;
 use SDL;
 use SDL::Config;
-
 use Test::More;
 
 if ( SDL::Config->has('SDL_image')