From 54585ba35adc6afc46201b746401c5a8a66ab6fa Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 29 May 2011 12:43:00 -0600 Subject: Add transform() to Python Objects. --- libdimension-python/Camera.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libdimension-python/Camera.c') diff --git a/libdimension-python/Camera.c b/libdimension-python/Camera.c index 17347d7..286c36d 100644 --- a/libdimension-python/Camera.c +++ b/libdimension-python/Camera.c @@ -46,8 +46,8 @@ dmnsn_py_Camera_initialize(dmnsn_py_Camera *self) static PyObject * dmnsn_py_Camera_transform(dmnsn_py_Camera *self, PyObject *args) { - dmnsn_py_Matrix *matrix; - if (!PyArg_ParseTuple(args, "O!", &dmnsn_py_MatrixType, &matrix)) + dmnsn_py_Matrix *trans; + if (!PyArg_ParseTuple(args, "O!", &dmnsn_py_MatrixType, &trans)) return NULL; if (!self->camera) { @@ -55,9 +55,9 @@ dmnsn_py_Camera_transform(dmnsn_py_Camera *self, PyObject *args) return NULL; } - self->camera->trans = dmnsn_matrix_mul(matrix->m, self->camera->trans); - Py_INCREF(Py_None); - return Py_None; + self->camera->trans = dmnsn_matrix_mul(trans->m, self->camera->trans); + Py_INCREF(self); + return (PyObject *)self; } static PyMethodDef dmnsn_py_Camera_methods[] = { -- cgit v1.2.3