diff options
Diffstat (limited to 'src/pl/plpython/plpy_cursorobject.c')
-rw-r--r-- | src/pl/plpython/plpy_cursorobject.c | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c index e32bc568bc2..45ac25b2ae0 100644 --- a/src/pl/plpython/plpy_cursorobject.c +++ b/src/pl/plpython/plpy_cursorobject.c @@ -43,37 +43,14 @@ static PyMethodDef PLy_cursor_methods[] = { static PyTypeObject PLy_CursorType = { PyVarObject_HEAD_INIT(NULL, 0) - "PLyCursor", /* tp_name */ - sizeof(PLyCursorObject), /* tp_size */ - 0, /* tp_itemsize */ - - /* - * methods - */ - PLy_cursor_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_compare */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER, /* tp_flags */ - PLy_cursor_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - PyObject_SelfIter, /* tp_iter */ - PLy_cursor_iternext, /* tp_iternext */ - PLy_cursor_methods, /* tp_tpmethods */ + .tp_name = "PLyCursor", + .tp_basicsize = sizeof(PLyCursorObject), + .tp_dealloc = PLy_cursor_dealloc, + .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_ITER, + .tp_doc = PLy_cursor_doc, + .tp_iter = PyObject_SelfIter, + .tp_iternext = PLy_cursor_iternext, + .tp_methods = PLy_cursor_methods, }; void |