Split __init__ into __init__ and __new__, code clean up
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1056 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
15ba8f9b3c
commit
d4e7e7724f
30 changed files with 305 additions and 542 deletions
|
@ -41,21 +41,12 @@ PySfClock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
|
||||
self = (PySfClock *)type->tp_alloc(type, 0);
|
||||
if (self != NULL)
|
||||
{
|
||||
}
|
||||
self->obj = new sf::Clock();
|
||||
|
||||
return (PyObject *)self;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
PySfClock_init(PySfClock *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
self->obj = new sf::Clock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static PyObject*
|
||||
PySfClock_GetElapsedTime(PySfClock *self)
|
||||
{
|
||||
|
@ -111,7 +102,7 @@ PyTypeObject PySfClockType = {
|
|||
0, /* tp_descr_get */
|
||||
0, /* tp_descr_set */
|
||||
0, /* tp_dictoffset */
|
||||
(initproc)PySfClock_init, /* tp_init */
|
||||
0, /* tp_init */
|
||||
0, /* tp_alloc */
|
||||
PySfClock_new, /* tp_new */
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue