Skip to content

Commit

Permalink
Forgotten Py_TYPE & PyVarObject changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jpe committed Apr 17, 2010
1 parent a29f161 commit 44a872d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/font.c
Expand Up @@ -204,8 +204,7 @@ static PyMethodDef toy_font_face_methods[] = {


PyTypeObject PycairoToyFontFace_Type = {
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
PyVarObject_HEAD_INIT(NULL, 0)
"cairo.ToyFontFace", /* tp_name */
sizeof(PycairoToyFontFace), /* tp_basicsize */
0, /* tp_itemsize */
Expand Down Expand Up @@ -282,7 +281,7 @@ scaled_font_dealloc(PycairoScaledFont *o) {
cairo_scaled_font_destroy (o->scaled_font);
o->scaled_font = NULL;
}
o->ob_type->tp_free((PyObject *) o);
Py_TYPE(o)->tp_free((PyObject *) o);
}

static PyObject *
Expand Down
3 changes: 1 addition & 2 deletions src/surface.c
Expand Up @@ -339,8 +339,7 @@ static PyMethodDef surface_methods[] = {


PyTypeObject PycairoSurface_Type = {
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
PyVarObject_HEAD_INIT(NULL, 0)
"cairo.Surface", /* tp_name */
sizeof(PycairoSurface), /* tp_basicsize */
0, /* tp_itemsize */
Expand Down

0 comments on commit 44a872d

Please sign in to comment.