Commits

pygame  committed 37281c7

ansi c cleanup

  • Participants
  • Parent commits ab99add

Comments (0)

Files changed (4)

 # BREAK = change breaks existing code
 # BUG   = fixed a bug that was crashing
 
+Mar 18, 2001
+	removed non-ANSI C code
+
 Mar 17, 2001
 	pygame.Surface is smarter with SRCALPHA flag
 	fixed several small bugs in surfarray [BUG]
 
 Mar 16, 2001
 	Fixed memory leak in Rect constructor
-	Fixed improper exception in update.display
+	Fixed improper exception in display.update(with_4_args)
 
 Feb 15, 2001
 	calling Sound.play() will make sure the channel
 {
 	if(endmusic_event && SDL_WasInit(SDL_INIT_VIDEO))
 	{
-		SDL_Event e = {endmusic_event};
+		SDL_Event e;
+		memset(&e, 0, sizeof(e));
+		e.type = endmusic_event;
 		SDL_PushEvent(&e);
 	}
 }
     /*DOC*/    "corner, and the width and height.\n"
     /*DOC*/ ;
 
-static PyObject* Rect(PyObject* self, PyObject* args)
+static PyObject* RectInit(PyObject* self, PyObject* args)
 {
 	GAME_Rect *argrect, temp;
 	if(!(argrect = GameRect_FromObject(args, &temp)))
 
 static PyMethodDef rect__builtins__[] =
 {
-	{ "Rect", Rect, 1, doc_Rect }, 
+	{ "Rect", RectInit, 1, doc_Rect }, 
 	{NULL, NULL}
 };
 
 {
 	if(SDL_WasInit(SDL_INIT_VIDEO))
 	{
-		SDL_Event event = {(int)param};
+		SDL_Event event;
+		memset(&event, 0, sizeof(event));
+		event.type = (int)param;
 		SDL_PushEvent(&event);
 	}
 	return interval;