changeset 930:02759105b989

Date: Fri, 20 Aug 2004 08:31:20 +0200 From: "Markus F.X.J. Oberhumer" Subject: [SDL-CVS][patch] add missing SDLCALL to headers the small patch attached below (against current CVS) adds some missing SDLCALL decorations to callback types and arguments. Unfortunately one of these changes breaks your gen{def,exp}.pl scripts which should be changed to use non-greedy regular expression matching...
author Sam Lantinga <slouken@libsdl.org>
date Fri, 20 Aug 2004 18:57:01 +0000
parents 03fb90fc135e
children abe872771687
files include/SDL_audio.h include/SDL_events.h include/SDL_rwops.h include/SDL_thread.h src/main/beos/exports/genexp.pl src/main/macos/exports/gendef.pl src/main/macosx/exports/gendef.pl src/main/win32/exports/gendef.pl
diffstat 8 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_audio.h	Wed Aug 18 21:41:39 2004 +0000
+++ b/include/SDL_audio.h	Fri Aug 20 18:57:01 2004 +0000
@@ -59,7 +59,7 @@
 	   Once the callback returns, the buffer will no longer be valid.
 	   Stereo samples are stored in a LRLRLR ordering.
 	*/
-	void (*callback)(void *userdata, Uint8 *stream, int len);
+	void (SDLCALL *callback)(void *userdata, Uint8 *stream, int len);
 	void  *userdata;
 } SDL_AudioSpec;
 
@@ -94,7 +94,7 @@
 	int    len_cvt;			/* Length of converted audio buffer */
 	int    len_mult;		/* buffer must be len*len_mult big */
 	double len_ratio; 	/* Given len, final size is len*len_ratio */
-	void (*filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
+	void (SDLCALL *filters[10])(struct SDL_AudioCVT *cvt, Uint16 format);
 	int filter_index;		/* Current audio conversion function */
 } SDL_AudioCVT;
 
--- a/include/SDL_events.h	Wed Aug 18 21:41:39 2004 +0000
+++ b/include/SDL_events.h	Fri Aug 20 18:57:01 2004 +0000
@@ -285,7 +285,7 @@
 
   The filter is protypted as:
 */
-typedef int (*SDL_EventFilter)(const SDL_Event *event);
+typedef int (SDLCALL *SDL_EventFilter)(const SDL_Event *event);
 /*
   If the filter returns 1, then the event will be added to the internal queue.
   If it returns 0, then the event will be dropped from the queue, but the 
--- a/include/SDL_rwops.h	Wed Aug 18 21:41:39 2004 +0000
+++ b/include/SDL_rwops.h	Fri Aug 20 18:57:01 2004 +0000
@@ -49,22 +49,22 @@
 		SEEK_SET, SEEK_CUR, SEEK_END
 	   Returns the final offset in the data source.
 	 */
-	int (*seek)(struct SDL_RWops *context, int offset, int whence);
+	int (SDLCALL *seek)(struct SDL_RWops *context, int offset, int whence);
 
 	/* Read up to 'num' objects each of size 'objsize' from the data
 	   source to the area pointed at by 'ptr'.
 	   Returns the number of objects read, or -1 if the read failed.
 	 */
-	int (*read)(struct SDL_RWops *context, void *ptr, int size, int maxnum);
+	int (SDLCALL *read)(struct SDL_RWops *context, void *ptr, int size, int maxnum);
 
 	/* Write exactly 'num' objects each of size 'objsize' from the area
 	   pointed at by 'ptr' to data source.
 	   Returns 'num', or -1 if the write failed.
 	 */
-	int (*write)(struct SDL_RWops *context, const void *ptr, int size, int num);
+	int (SDLCALL *write)(struct SDL_RWops *context, const void *ptr, int size, int num);
 
 	/* Close and free an allocated SDL_FSops structure */
-	int (*close)(struct SDL_RWops *context);
+	int (SDLCALL *close)(struct SDL_RWops *context);
 
 	Uint32 type;
 	union {
--- a/include/SDL_thread.h	Wed Aug 18 21:41:39 2004 +0000
+++ b/include/SDL_thread.h	Fri Aug 20 18:57:01 2004 +0000
@@ -50,7 +50,7 @@
 typedef struct SDL_Thread SDL_Thread;
 
 /* Create a thread */
-extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (*fn)(void *), void *data);
+extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data);
 
 /* Get the 32-bit thread identifier for the current thread */
 extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
--- a/src/main/beos/exports/genexp.pl	Wed Aug 18 21:41:39 2004 +0000
+++ b/src/main/beos/exports/genexp.pl	Fri Aug 20 18:57:01 2004 +0000
@@ -9,7 +9,7 @@
 	}
 	$file =~ s,.*/,,;
 	while (<FILE>) {
-		if ( / DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
+		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
 			print "_$1\n";
 		}
 	}
--- a/src/main/macos/exports/gendef.pl	Wed Aug 18 21:41:39 2004 +0000
+++ b/src/main/macos/exports/gendef.pl	Fri Aug 20 18:57:01 2004 +0000
@@ -10,7 +10,7 @@
 	$printed_header = 0;
 	$file =~ s,.*/,,;
 	while (<FILE>) {
-		if ( / DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
+		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
 			print "\t$1\n";
 		}
 	}
--- a/src/main/macosx/exports/gendef.pl	Wed Aug 18 21:41:39 2004 +0000
+++ b/src/main/macosx/exports/gendef.pl	Fri Aug 20 18:57:01 2004 +0000
@@ -14,7 +14,7 @@
 	$printed_header = 0;
 	$file =~ s,.*/,,;
 	while (<FILE>) {
-		if ( / DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
+		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
 			print "\t_$1\n";
 		}
 	}
--- a/src/main/win32/exports/gendef.pl	Wed Aug 18 21:41:39 2004 +0000
+++ b/src/main/win32/exports/gendef.pl	Fri Aug 20 18:57:01 2004 +0000
@@ -10,7 +10,7 @@
 	$printed_header = 0;
 	$file =~ s,.*/,,;
 	while (<FILE>) {
-		if ( / DECLSPEC.*SDLCALL ([^\s\(]+)/ ) {
+		if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) {
 			print "\t$1\n";
 		}
 	}