Anonymous avatar Anonymous committed 41eb248

Fixed pointer bindings for base.Font and PySDLFont_TTF.

Comments (0)

Files changed (4)

 * Rewrite RST generator to support aliased imports correctly.
 * Check display surface tracking for multiple calls to set_mode using
   different return variables.
+* Argument parsing must handle 64-bit conversions correctly.
 
 Things to ADD:
 ==============
 * SDL_Thread*
 * SDL_gfx image filter functions
 * characterXXX wrappers for sdlgdfx
+

src/sdl/rwopsmod.c

 static SDL_RWops* PyRWops_NewRW (PyObject *obj, int *canautoclose);
 static SDL_RWops* PyRWops_NewRW_Threaded (PyObject *obj, int *canautoclose);
 static void PyRWops_Close (SDL_RWops *ops, int canautoclose);
-static void PyRWops_Close_Threaded (SDL_RWops *ops, int canautoclose);
 
 static void
 _bind_python_methods (_RWWrapper *wrapper, PyObject *obj)
 _quit (void)
 {
     int i;
-    for (i = 0; i < _quitcount; i++)
-        (*_quitcallbacks[i])();
+    if (_quitcallbacks != NULL)
+        for (i = 0; i < _quitcount; i++)
+            (*_quitcallbacks[i])();
     SDL_Quit ();
 }
 

src/sdlttf/font.c

 static void _font_dealloc (PySDLFont_TTF *self);
 
 static PyObject* _font_glyphmetrics (PyObject *self, PyObject* args);
-static PyObject* _font_getsize (PyObject *self, PyObject* args);
+static PyObject* _font_getsize (PyObject *self, PyObject* args, PyObject *kwds);
 static PyObject* _font_render (PyObject *self, PyObject* args, PyObject *kwds);
 
 static PyObject* _font_getstyle (PyObject *self, void *closure);
 static PyMethodDef _font_methods[] = {
     { "get_glyph_metrics", _font_glyphmetrics, METH_VARARGS,
       DOC_BASE_FONT_GET_GLYPH_METRICS },
-    { "get_size", _font_getsize, METH_VARARGS, DOC_BASE_FONT_GET_SIZE },
+    { "get_size", (PyCFunction) _font_getsize, METH_VARARGS | METH_KEYWORDS,
+      DOC_BASE_FONT_GET_SIZE },
     { "render", (PyCFunction)_font_render, METH_VARARGS | METH_KEYWORDS,
       DOC_BASE_FONT_RENDER },
     { NULL, NULL, 0, NULL }
 }
 
 static PyObject*
-_font_getsize (PyObject *self, PyObject* args)
+_font_getsize (PyObject *self, PyObject* args, PyObject *kwds)
 {
     PySDLFont_TTF *font = (PySDLFont_TTF*) self;
     PyObject *text;
     if (!file)
         return NULL;
 
-    font = (PySDLFont_TTF*) PySDLFont_TTF_Type.tp_new (&PySDLFont_TTF_Type, NULL, NULL);
+    font = (PySDLFont_TTF*) PySDLFont_TTF_Type.tp_new (&PySDLFont_TTF_Type,
+        NULL, NULL);
     if (!font)
         return NULL;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.