summaryrefslogtreecommitdiffstats
path: root/libdimension-python/Camera.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-29 12:43:00 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-29 12:43:00 -0600
commit54585ba35adc6afc46201b746401c5a8a66ab6fa (patch)
tree0932e8b7bb7c3a590180a22d3b268c4d66ca9dca /libdimension-python/Camera.c
parent4479d25609e26253c4e5fcfc78b093c0b45cefb8 (diff)
downloaddimension-54585ba35adc6afc46201b746401c5a8a66ab6fa.tar.xz
Add transform() to Python Objects.
Diffstat (limited to 'libdimension-python/Camera.c')
-rw-r--r--libdimension-python/Camera.c10
1 files changed, 5 insertions, 5 deletions
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[] = {