Fixed bug 3744 - missing SDLCALL in several functions
authorSam Lantinga <slouken@libsdl.org>
Sun, 13 Aug 2017 21:06:52 -0700
changeset 11272d60ede5a0c2e
parent 11271 ab3f2402a777
child 11273 1a13003276fc
Fixed bug 3744 - missing SDLCALL in several functions

Ozkan Sezer

The attached patch adds missing SDLCALL to several functions, so that
they properly match the headers as intended.
src/SDL_assert.c
src/events/SDL_windowevents.c
src/joystick/SDL_gamecontroller.c
src/render/SDL_render.c
src/timer/SDL_timer.c
test/testatomic.c
test/testautomation_audio.c
test/testautomation_events.c
test/testautomation_timer.c
test/testhittesting.c
test/testmessage.c
     1.1 --- a/src/SDL_assert.c	Sun Aug 13 21:05:15 2017 -0700
     1.2 +++ b/src/SDL_assert.c	Sun Aug 13 21:06:52 2017 -0700
     1.3 @@ -49,7 +49,7 @@
     1.4  #endif
     1.5  
     1.6  
     1.7 -static SDL_assert_state
     1.8 +static SDL_assert_state SDLCALL
     1.9  SDL_PromptAssertion(const SDL_assert_data *data, void *userdata);
    1.10  
    1.11  /*
    1.12 @@ -141,7 +141,7 @@
    1.13  }
    1.14  
    1.15  
    1.16 -static SDL_assert_state
    1.17 +static SDL_assert_state SDLCALL
    1.18  SDL_PromptAssertion(const SDL_assert_data *data, void *userdata)
    1.19  {
    1.20  #ifdef __WIN32__
     2.1 --- a/src/events/SDL_windowevents.c	Sun Aug 13 21:05:15 2017 -0700
     2.2 +++ b/src/events/SDL_windowevents.c	Sun Aug 13 21:06:52 2017 -0700
     2.3 @@ -28,7 +28,7 @@
     2.4  #include "../video/SDL_sysvideo.h"
     2.5  
     2.6  
     2.7 -static int
     2.8 +static int SDLCALL
     2.9  RemovePendingResizedEvents(void * userdata, SDL_Event *event)
    2.10  {
    2.11      SDL_Event *new_event = (SDL_Event *)userdata;
    2.12 @@ -42,7 +42,7 @@
    2.13      return 1;
    2.14  }
    2.15  
    2.16 -static int
    2.17 +static int SDLCALL
    2.18  RemovePendingSizeChangedEvents(void * userdata, SDL_Event *event)
    2.19  {
    2.20      SDL_Event *new_event = (SDL_Event *)userdata;
    2.21 @@ -56,7 +56,7 @@
    2.22      return 1;
    2.23  }
    2.24  
    2.25 -static int
    2.26 +static int SDLCALL
    2.27  RemovePendingMoveEvents(void * userdata, SDL_Event *event)
    2.28  {
    2.29      SDL_Event *new_event = (SDL_Event *)userdata;
    2.30 @@ -70,7 +70,7 @@
    2.31      return 1;
    2.32  }
    2.33  
    2.34 -static int
    2.35 +static int SDLCALL
    2.36  RemovePendingExposedEvents(void * userdata, SDL_Event *event)
    2.37  {
    2.38      SDL_Event *new_event = (SDL_Event *)userdata;
     3.1 --- a/src/joystick/SDL_gamecontroller.c	Sun Aug 13 21:05:15 2017 -0700
     3.2 +++ b/src/joystick/SDL_gamecontroller.c	Sun Aug 13 21:06:52 2017 -0700
     3.3 @@ -333,7 +333,7 @@
     3.4  /*
     3.5   * Event filter to fire controller events from joystick ones
     3.6   */
     3.7 -static int SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
     3.8 +static int SDLCALL SDL_GameControllerEventWatcher(void *userdata, SDL_Event * event)
     3.9  {
    3.10      switch(event->type) {
    3.11      case SDL_JOYAXISMOTION:
     4.1 --- a/src/render/SDL_render.c	Sun Aug 13 21:05:15 2017 -0700
     4.2 +++ b/src/render/SDL_render.c	Sun Aug 13 21:06:52 2017 -0700
     4.3 @@ -102,7 +102,7 @@
     4.4  #endif
     4.5  }
     4.6  
     4.7 -static int
     4.8 +static int SDLCALL
     4.9  SDL_RendererEventWatch(void *userdata, SDL_Event *event)
    4.10  {
    4.11      SDL_Renderer *renderer = (SDL_Renderer *)userdata;
     5.1 --- a/src/timer/SDL_timer.c	Sun Aug 13 21:05:15 2017 -0700
     5.2 +++ b/src/timer/SDL_timer.c	Sun Aug 13 21:06:52 2017 -0700
     5.3 @@ -97,7 +97,7 @@
     5.4      timer->next = curr;
     5.5  }
     5.6  
     5.7 -static int
     5.8 +static int SDLCALL
     5.9  SDL_TimerThread(void *_data)
    5.10  {
    5.11      SDL_TimerData *data = (SDL_TimerData *)_data;
     6.1 --- a/test/testatomic.c	Sun Aug 13 21:05:15 2017 -0700
     6.2 +++ b/test/testatomic.c	Sun Aug 13 21:06:52 2017 -0700
     6.3 @@ -117,7 +117,7 @@
     6.4  static SDL_sem *threadDone;
     6.5  
     6.6  static
     6.7 -int adder(void* junk)
     6.8 +int SDLCALL adder(void* junk)
     6.9  {
    6.10      unsigned long N=NInter;
    6.11      SDL_Log("Thread subtracting %d %lu times\n",CountInc,N);
    6.12 @@ -495,7 +495,7 @@
    6.13      char padding[SDL_CACHELINE_SIZE-(sizeof(SDL_EventQueue*)+sizeof(int)*NUM_WRITERS+sizeof(int)+sizeof(SDL_bool))%SDL_CACHELINE_SIZE];
    6.14  } ReaderData;
    6.15  
    6.16 -static int FIFO_Writer(void* _data)
    6.17 +static int SDLCALL FIFO_Writer(void* _data)
    6.18  {
    6.19      WriterData *data = (WriterData *)_data;
    6.20      SDL_EventQueue *queue = data->queue;
    6.21 @@ -530,7 +530,7 @@
    6.22      return 0;
    6.23  }
    6.24  
    6.25 -static int FIFO_Reader(void* _data)
    6.26 +static int SDLCALL FIFO_Reader(void* _data)
    6.27  {
    6.28      ReaderData *data = (ReaderData *)_data;
    6.29      SDL_EventQueue *queue = data->queue;
    6.30 @@ -570,7 +570,7 @@
    6.31  
    6.32  #ifdef TEST_SPINLOCK_FIFO
    6.33  /* This thread periodically locks the queue for no particular reason */
    6.34 -static int FIFO_Watcher(void* _data)
    6.35 +static int SDLCALL FIFO_Watcher(void* _data)
    6.36  {
    6.37      SDL_EventQueue *queue = (SDL_EventQueue *)_data;
    6.38  
     7.1 --- a/test/testautomation_audio.c	Sun Aug 13 21:05:15 2017 -0700
     7.2 +++ b/test/testautomation_audio.c	Sun Aug 13 21:06:52 2017 -0700
     7.3 @@ -46,7 +46,7 @@
     7.4  
     7.5  
     7.6  /* Test callback function */
     7.7 -void _audio_testCallback(void *userdata, Uint8 *stream, int len)
     7.8 +void SDLCALL _audio_testCallback(void *userdata, Uint8 *stream, int len)
     7.9  {
    7.10     /* track that callback was called */
    7.11     _audio_testCallbackCounter++;
     8.1 --- a/test/testautomation_events.c	Sun Aug 13 21:05:15 2017 -0700
     8.2 +++ b/test/testautomation_events.c	Sun Aug 13 21:06:52 2017 -0700
     8.3 @@ -25,7 +25,7 @@
     8.4  int _userdataValue2 = 2;
     8.5  
     8.6  /* Event filter that sets some flags and optionally checks userdata */
     8.7 -int _events_sampleNullEventFilter(void *userdata, SDL_Event *event)
     8.8 +int SDLCALL _events_sampleNullEventFilter(void *userdata, SDL_Event *event)
     8.9  {
    8.10     _eventFilterCalled = 1;
    8.11  
     9.1 --- a/test/testautomation_timer.c	Sun Aug 13 21:05:15 2017 -0700
     9.2 +++ b/test/testautomation_timer.c	Sun Aug 13 21:06:52 2017 -0700
     9.3 @@ -104,7 +104,7 @@
     9.4  }
     9.5  
     9.6  /* Test callback */
     9.7 -Uint32 _timerTestCallback(Uint32 interval, void *param)
     9.8 +Uint32 SDLCALL _timerTestCallback(Uint32 interval, void *param)
     9.9  {
    9.10     _timerCallbackCalled = 1;
    9.11  
    10.1 --- a/test/testhittesting.c	Sun Aug 13 21:05:15 2017 -0700
    10.2 +++ b/test/testhittesting.c	Sun Aug 13 21:06:52 2017 -0700
    10.3 @@ -14,7 +14,7 @@
    10.4  static const SDL_Rect *areas = drag_areas;
    10.5  static int numareas = SDL_arraysize(drag_areas);
    10.6  
    10.7 -static SDL_HitTestResult
    10.8 +static SDL_HitTestResult SDLCALL
    10.9  hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
   10.10  {
   10.11      int i;
    11.1 --- a/test/testmessage.c	Sun Aug 13 21:05:15 2017 -0700
    11.2 +++ b/test/testmessage.c	Sun Aug 13 21:06:52 2017 -0700
    11.3 @@ -25,7 +25,7 @@
    11.4      exit(rc);
    11.5  }
    11.6  
    11.7 -static int
    11.8 +static int SDLCALL
    11.9  button_messagebox(void *eventNumber)
   11.10  {
   11.11      const SDL_MessageBoxButtonData buttons[] = {