From: Tobias Leich Date: Mon, 9 Nov 2009 16:31:57 +0000 (+0100) Subject: removed new() and DESTROY() for all events but SDL::Event X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ab81589aecaef35ae61def553769a36b03c66a8;p=sdlgit%2FSDL_perl.git removed new() and DESTROY() for all events but SDL::Event --- diff --git a/src/Core/objects/ActiveEvent.xs b/src/Core/objects/ActiveEvent.xs index 6fa0934..21a5d92 100644 --- a/src/Core/objects/ActiveEvent.xs +++ b/src/Core/objects/ActiveEvent.xs @@ -23,15 +23,6 @@ SDL_ActiveEvent -- Application visibility event structure =cut -SDL_ActiveEvent * -aevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_ActiveEvent)); - RETVAL->type = SDL_ACTIVEEVENT; - OUTPUT: - RETVAL - Uint8 aevent_type ( event, ... ) SDL_ActiveEvent *event @@ -67,9 +58,3 @@ aevent_state ( event, ... ) RETVAL = event->state; OUTPUT: RETVAL - -void -aevent_DESTROY(self) - SDL_ActiveEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/ExposeEvent.xs b/src/Core/objects/ExposeEvent.xs index eac183c..8692875 100644 --- a/src/Core/objects/ExposeEvent.xs +++ b/src/Core/objects/ExposeEvent.xs @@ -21,15 +21,6 @@ SDL_ExposeEvent -- Window expose event =cut -SDL_ExposeEvent * -weevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_ExposeEvent)); - RETVAL->type = SDL_VIDEOEXPOSE; - OUTPUT: - RETVAL - Uint8 weevent_type ( event, ... ) SDL_ExposeEvent *event @@ -37,9 +28,3 @@ weevent_type ( event, ... ) RETVAL = event->type; OUTPUT: RETVAL - -void -weevent_DESTROY(self) - SDL_ExposeEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/JoyAxisEvent.xs b/src/Core/objects/JoyAxisEvent.xs index fa51e98..9fa3931 100644 --- a/src/Core/objects/JoyAxisEvent.xs +++ b/src/Core/objects/JoyAxisEvent.xs @@ -24,15 +24,6 @@ SDL_JoyAxisEvent -- Joystick axis motion event structure =cut -SDL_JoyAxisEvent * -jaevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_JoyAxisEvent)); - RETVAL->type = SDL_JOYAXISMOTION; - OUTPUT: - RETVAL - Uint8 jaevent_type ( event, ... ) SDL_JoyAxisEvent *event @@ -82,9 +73,3 @@ jaevent_value ( event, ... ) RETVAL = event->value; OUTPUT: RETVAL - -void -jaevent_DESTROY(self) - SDL_JoyAxisEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/JoyBallEvent.xs b/src/Core/objects/JoyBallEvent.xs index eb50e35..e0e3579 100644 --- a/src/Core/objects/JoyBallEvent.xs +++ b/src/Core/objects/JoyBallEvent.xs @@ -24,15 +24,6 @@ SDL_JoyBallEvent -- Joystick trackball motion event structure =cut -SDL_JoyBallEvent * -jtevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_JoyBallEvent)); - RETVAL->type = SDL_JOYBALLMOTION; - OUTPUT: - RETVAL - Uint8 jtevent_type ( event, ... ) SDL_JoyBallEvent *event @@ -98,9 +89,3 @@ jtevent_yrel ( event, ... ) RETVAL = event->yrel; OUTPUT: RETVAL - -void -jtevent_DESTROY(self) - SDL_JoyBallEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/JoyButtonEvent.xs b/src/Core/objects/JoyButtonEvent.xs index e332d4e..67ed55b 100644 --- a/src/Core/objects/JoyButtonEvent.xs +++ b/src/Core/objects/JoyButtonEvent.xs @@ -24,15 +24,6 @@ SDL_JoyButtonEvent -- Joystick button event structure =cut -SDL_JoyButtonEvent * -jbevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_JoyButtonEvent)); - RETVAL->type = SDL_JOYBUTTONDOWN; - OUTPUT: - RETVAL - Uint8 jbevent_type ( event, ... ) @@ -96,11 +87,3 @@ jbevent_state ( event ) RETVAL = event->state; OUTPUT: RETVAL - -void -jbevent_DESTROY(self) - - SDL_JoyButtonEvent *self - - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/JoyHatEvent.xs b/src/Core/objects/JoyHatEvent.xs index e14c34d..3c21327 100644 --- a/src/Core/objects/JoyHatEvent.xs +++ b/src/Core/objects/JoyHatEvent.xs @@ -24,15 +24,6 @@ SDL_JoyHatEvent -- Joystick hat position change event structure =cut -SDL_JoyHatEvent * -jhevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_JoyHatEvent)); - RETVAL->type = SDL_JOYHATMOTION; - OUTPUT: - RETVAL - Uint8 jhevent_type ( event, ... ) SDL_JoyHatEvent *event @@ -83,9 +74,3 @@ jhevent_value ( event, ... ) RETVAL = event->value; OUTPUT: RETVAL - -void -jhevent_DESTROY(self) - SDL_JoyHatEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/KeyboardEvent.xs b/src/Core/objects/KeyboardEvent.xs index 53cebc4..37a67cc 100644 --- a/src/Core/objects/KeyboardEvent.xs +++ b/src/Core/objects/KeyboardEvent.xs @@ -23,15 +23,6 @@ SDL_KeyboardEvent -- Keyboard event structure =cut -SDL_KeyboardEvent * -kbevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_KeyboardEvent)); - RETVAL->type = SDL_KEYDOWN; - OUTPUT: - RETVAL - Uint8 kbevent_type ( event, ... ) SDL_KeyboardEvent *event @@ -77,10 +68,3 @@ kbevent_keysym ( event, ... ) RETVAL = &(event->keysym); OUTPUT: RETVAL - -void -kbevent_DESTROY(self) - SDL_KeyboardEvent *self - CODE: - safefree( (char *)self ); - diff --git a/src/Core/objects/MouseButtonEvent.xs b/src/Core/objects/MouseButtonEvent.xs index a8b38d0..7139c4d 100644 --- a/src/Core/objects/MouseButtonEvent.xs +++ b/src/Core/objects/MouseButtonEvent.xs @@ -25,15 +25,6 @@ SDL_MouseButtonEvent -- Mouse button event structure =cut -SDL_MouseButtonEvent * -mbevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_MouseButtonEvent)); - RETVAL->type = SDL_MOUSEBUTTONDOWN; - OUTPUT: - RETVAL - Uint8 mbevent_type ( event, ... ) SDL_MouseButtonEvent *event @@ -122,10 +113,3 @@ mbevent_y ( event, ... ) RETVAL = event->y; OUTPUT: RETVAL - - -void -mbevent_DESTROY(self) - SDL_MouseButtonEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/MouseMotionEvent.xs b/src/Core/objects/MouseMotionEvent.xs index da80e6d..791d990 100644 --- a/src/Core/objects/MouseMotionEvent.xs +++ b/src/Core/objects/MouseMotionEvent.xs @@ -24,15 +24,6 @@ SDL_MouseMotionEvent -- Mouse motion event structure =cut -SDL_MouseMotionEvent * -mmevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_MouseMotionEvent)); - RETVAL->type = SDL_MOUSEMOTION; - OUTPUT: - RETVAL - Uint8 mmevent_type ( event, ... ) SDL_MouseMotionEvent *event @@ -106,9 +97,3 @@ mmevent_yrel ( event, ... ) RETVAL = event->yrel; OUTPUT: RETVAL - -void -mmtevent_DESTROY(self) - SDL_MouseMotionEvent *self - CODE: - safefree( (char *)self ); diff --git a/src/Core/objects/QuitEvent.xs b/src/Core/objects/QuitEvent.xs index 719304b..b33ccbb 100644 --- a/src/Core/objects/QuitEvent.xs +++ b/src/Core/objects/QuitEvent.xs @@ -21,15 +21,6 @@ SDL_QuitEvent -- Quit requested event =cut -SDL_QuitEvent * -qevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_QuitEvent)); - RETVAL->type = SDL_QUIT; - OUTPUT: - RETVAL - Uint8 qevent_type ( event, ... ) SDL_QuitEvent *event @@ -37,9 +28,3 @@ qevent_type ( event, ... ) RETVAL = event->type; OUTPUT: RETVAL - -void -qevent_DESTROY ( event) - SDL_QuitEvent *event - CODE: - safefree( (char *) event); diff --git a/src/Core/objects/ResizeEvent.xs b/src/Core/objects/ResizeEvent.xs index f62ea46..f91c5b9 100644 --- a/src/Core/objects/ResizeEvent.xs +++ b/src/Core/objects/ResizeEvent.xs @@ -22,15 +22,6 @@ SDL_ResizeEvent -- Window resize event structure =cut -SDL_ResizeEvent * -wrevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_ResizeEvent)); - RETVAL->type = SDL_VIDEORESIZE; - OUTPUT: - RETVAL - Uint8 wrevent_type ( event, ... ) SDL_ResizeEvent *event @@ -66,9 +57,3 @@ wrevent_h ( event, ... ) RETVAL = event->h; OUTPUT: RETVAL - -void -wrevent_DESTROY ( event) - SDL_ResizeEvent *event - CODE: - safefree( (char *) event); diff --git a/src/Core/objects/SysWMEvent.xs b/src/Core/objects/SysWMEvent.xs index 29991ff..6270dc0 100644 --- a/src/Core/objects/SysWMEvent.xs +++ b/src/Core/objects/SysWMEvent.xs @@ -23,15 +23,6 @@ see also: L =cut -SDL_SysWMEvent * -wmevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_SysWMEvent)); - RETVAL->type = SDL_SYSWMEVENT; - OUTPUT: - RETVAL - Uint8 wmevent_type ( event, ... ) SDL_SysWMEvent *event @@ -56,10 +47,3 @@ wmevent_msg ( event, ... ) RETVAL = event->msg; OUTPUT: RETVAL - -void -wmevent_DESTROY ( event) - SDL_SysWMEvent *event - CODE: - safefree( (char *) event); - diff --git a/src/Core/objects/UserEvent.xs b/src/Core/objects/UserEvent.xs index 36dd650..458953b 100644 --- a/src/Core/objects/UserEvent.xs +++ b/src/Core/objects/UserEvent.xs @@ -24,15 +24,6 @@ SDL_UserEvent -- A user-defined event type =cut -SDL_UserEvent * -uevent_new ( CLASS ) - char* CLASS - CODE: - RETVAL = safemalloc(sizeof(SDL_UserEvent)); - RETVAL->type = SDL_USEREVENT; - OUTPUT: - RETVAL - Uint8 uevent_type ( event ) SDL_UserEvent *event @@ -78,10 +69,3 @@ uevent_data2 ( event, ... ) RETVAL = event->data1; OUTPUT: RETVAL - - -void -uevent_DESTROY(self) - SDL_UserEvent *self - CODE: - safefree( (char *)self );