1. pygame
  2. Untitled project
  3. pygame


marcus  committed 41eb248

Fixed pointer bindings for base.Font and PySDLFont_TTF.

  • Participants
  • Parent commits 15121dd
  • Branches pgreloaded

Comments (0)

Files changed (4)

File TODO.txt

View file
 * 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

File src/sdl/rwopsmod.c

View file
 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)

File src/sdl/sdlmod.c

View file
 _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 ();

File src/sdlttf/font.c

View file
 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,
-    { "get_size", _font_getsize, METH_VARARGS, DOC_BASE_FONT_GET_SIZE },
+    { "get_size", (PyCFunction) _font_getsize, METH_VARARGS | METH_KEYWORDS,
     { "render", (PyCFunction)_font_render, METH_VARARGS | METH_KEYWORDS,
     { 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;