A new test for surface leaks. I made is as simple as possible but it does get worse...
Kartik Thakore [Sat, 29 Aug 2009 17:03:35 +0000 (13:03 -0400)]
Build.PL
META.yml
README
lib/SDL.pm
t/surfaceML.t [new file with mode: 0644]

index ddf7520..3c42138 100755 (executable)
--- a/Build.PL
+++ b/Build.PL
@@ -142,7 +142,7 @@ my $build   = SDL::Build->new(
        xs_files             => \%xs,
        meta_add             =>      
        {
-               no_index =>  { file => [ <make/lib/SDL/*.pm>, <make/lib/SDL/Build/*.pm> ] },
+               no_index =>  { file => [ <make/lib/SDL/*.pm>, <make/lib/SDL/Build/*.pm>, <make/lib/ExtUtils/CBuilder/*>, <make/lib/ExtUtils/*>, <make/lib/ExtUtils/CBuilder/Platform/Windows.pm> ] },
        },
        dist_author          => 'David J. Goehrig <DGOEHRIG@cpan.org>',
 );
index 77bbcd8..28e1f26 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -1,6 +1,6 @@
 ---
 name: SDL_Perl
-version: v2.2.2
+version: v2.2.2.1
 author:
   - 'David J. Goehrig <DGOEHRIG@cpan.org>'
 abstract: Simple DirectMedia Layer for Perl
@@ -17,7 +17,7 @@ configure_requires:
 provides:
   SDL:
     file: lib/SDL.pm
-    version: v2.2.2
+    version: v2.2.2.1
   SDL::App:
     file: lib/SDL/App.pm
   SDL::Cdrom:
@@ -90,3 +90,6 @@ no_index:
     - make/lib/SDL/Build/Netbsd.pm
     - make/lib/SDL/Build/Openbsd.pm
     - make/lib/SDL/Build/Solaris.pm
+    - make/lib/ExtUtils/CBuilder/Platform
+    - make/lib/ExtUtils/CBuilder
+    - make/lib/ExtUtils/CBuilder/Platform/Windows.pm
diff --git a/README b/README
index f013bb0..8369559 100644 (file)
--- a/README
+++ b/README
@@ -1,12 +1,16 @@
-README for SDL_Perl-2.2.1
+README for SDL_Perl-2.2.2
 
-What's New in 2.2.1:
+What's New in 2.2.2:
 
-SDL_Perl-2.2.1
-Adds critical bug fixes in the following areas:
--SDL and Constants
--SFont and TTFont 
--SDL::Tutorial
+SDL_Perl-2.2.2
+
+       -Made App loop() faster https://rt.cpan.org/Public/Bug/Display.html?id=16988
+       -Patched support for add support for gluquadric* sub https://rt.cpan.org/Public/Bug/Display.html?id=25598
+       -Made App init slimer https://rt.cpan.org/Public/Bug/Display.html?id=16987
+       -Added faster SDL::Color alternative https://rt.cpan.org/Public/Bug/Display.html?id=17975
+       -Added better error reporting for TTFont errors
+       -Added win32 support https://rt.cpan.org/Ticket/Display.html?id=49003
+       
 
 Prerequisites:
 
index 55a44b0..0feec39 100644 (file)
@@ -54,7 +54,7 @@ sub import {
   $self->export_to_level(1, @_);
   SDL::Constants->export_to_level(1);
 }
-$VERSION = '2.2.2';
+$VERSION = '2.2.2.1';
 
 print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl'));
 
diff --git a/t/surfaceML.t b/t/surfaceML.t
new file mode 100644 (file)
index 0000000..a459e52
--- /dev/null
@@ -0,0 +1,73 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2009 Kartik Thakore
+#
+# ------------------------------------------------------------------------------
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+# 
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+# 
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+#
+# ------------------------------------------------------------------------------
+#
+# Please feel free to send questions, suggestions or improvements to:
+#
+#      Kartik Thakore
+#      kthakore\@cpan.org
+#
+#
+# Memory leaks testing
+
+BEGIN {
+       unshift @INC, 'blib/lib', 'blib/arch';
+}
+
+use strict;
+
+use Test::More;
+
+# This is stolen for Gabor's examples in padre's SDL plugin
+sub surface_leak()
+{
+       use SDL;
+       use SDL::Surface;
+       use SDL::Rect;
+       use SDL::Color;
+
+       my $window = SDL::Surface->new(
+               -width => 640,
+               -height => 480,
+               -depth => 16,
+               -title => 'SDL Demo',
+
+       );
+
+       my $rect = SDL::Rect->new( -height => 10, -width => 20);
+
+       #my $blue = SDL::Color->new(
+       #       -r => 0x00,
+#              -g => 0x00,
+#              -b => 0xff,
+#      );
+#      $window->fill($rect, $blue);
+       $window->update($rect);
+
+}
+
+eval 'use Test::Valgrind';
+plan skip_all => 'Test::Valgrind is required to test your distribution with valgrind' if $@;
+
+surface_leak();
+
+
+