From: Kartik Thakore Date: Fri, 30 Oct 2009 17:49:00 +0000 (-0400) Subject: geterror to get_error X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c5bf64e5921a39264e01b1f3d4353373c08fb23e;p=sdlgit%2FSDL_perl.git geterror to get_error --- diff --git a/lib/SDL/App.pm b/lib/SDL/App.pm index 8c8665f..fbc3084 100644 --- a/lib/SDL/App.pm +++ b/lib/SDL/App.pm @@ -113,7 +113,7 @@ sub new { } my $self = SDL::SetVideoMode($w,$h,$d,$f) - or croak SDL::geterror(); + or croak SDL::get_error(); if ($ic and -e $ic) { my $icon = new SDL::Surface -name => $ic; @@ -157,7 +157,7 @@ sub ticks { } sub error { - return SDL::geterror(); + return SDL::get_error(); } sub warp ($$$) { diff --git a/lib/SDL/Game/Rect.pm b/lib/SDL/Game/Rect.pm index 3166b8f..07164b4 100644 --- a/lib/SDL/Game/Rect.pm +++ b/lib/SDL/Game/Rect.pm @@ -16,7 +16,7 @@ sub new { my $self = $class->SUPER::new($x, $y, $w, $h); unless ($$self) { #require Carp; - croak SDL::GetError(); + croak SDL::get_error(); } bless $self, $class; return $self; diff --git a/lib/SDL/Timer.pm b/lib/SDL/Timer.pm index 1265841..55618fb 100644 --- a/lib/SDL/Timer.pm +++ b/lib/SDL/Timer.pm @@ -54,7 +54,7 @@ sub new { $$self{-routine} = sub { &$func; $$self{-delay}}; } $$self{-timer} = SDL::NewTimer($$self{-delay},$$self{-routine}); - croak "Could not create timer, ", SDL::geterror(), "\n" + croak "Could not create timer, ", SDL::get_error(), "\n" unless ($self->{-timer}); bless $self,$class; return $self; diff --git a/src/SDL.xs b/src/SDL.xs index 5711e3a..defa68c 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -257,7 +257,7 @@ MODULE = SDL_perl PACKAGE = SDL PROTOTYPES : DISABLE char * -geterror () +get_error () CODE: RETVAL = SDL_GetError(); OUTPUT: diff --git a/t/core_video.t b/t/core_video.t index 81001ef..8821652 100644 --- a/t/core_video.t +++ b/t/core_video.t @@ -40,7 +40,7 @@ SDL::init(SDL_INIT_VIDEO); my $display = SDL::Video::set_video_mode(640,480,32, SDL_SWSURFACE ); if(!$display){ - plan skip_all => 'Couldn\'t set video mode: '. SDL::geterror(); + plan skip_all => 'Couldn\'t set video mode: '. SDL::get_error(); } #diag('Testing SDL::Video'); @@ -92,7 +92,7 @@ for(my $i=0;$i<256;$i++){ my $hwdisplay = SDL::Video::set_video_mode(640,480,8, SDL_HWSURFACE ); if(!$hwdisplay){ - plan skip_all => 'Couldn\'t set video mode: '. SDL::geterror(); + plan skip_all => 'Couldn\'t set video mode: '. SDL::get_error(); } $value = SDL::Video::set_colors($hwdisplay, 0);