summaryrefslogtreecommitdiffstats
path: root/libdimension-python/Vector.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-19 18:07:57 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-19 18:07:57 -0600
commit05ffbe15e92140617e90fe0ccbc22cc1fe0ac3e3 (patch)
tree3f1dc798357f5f4535967c98185b1aea5119a6a4 /libdimension-python/Vector.c
parent6d86cbdcdeb60cdaa5146d186a33e844a09aaf86 (diff)
downloaddimension-05ffbe15e92140617e90fe0ccbc22cc1fe0ac3e3.tar.xz
Don't #include .c files.
Diffstat (limited to 'libdimension-python/Vector.c')
-rw-r--r--libdimension-python/Vector.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/libdimension-python/Vector.c b/libdimension-python/Vector.c
index ca7d4e1..d4ed533 100644
--- a/libdimension-python/Vector.c
+++ b/libdimension-python/Vector.c
@@ -18,12 +18,8 @@
* <http://www.gnu.org/licenses/>. *
*************************************************************************/
-typedef struct dmnsn_py_Vector {
- PyObject_HEAD
- dmnsn_vector v;
-} dmnsn_py_Vector;
-
-static PyTypeObject dmnsn_py_VectorType;
+#include "Vector.h"
+#include "dimension.h"
static int
dmnsn_py_Vector_init(dmnsn_py_Vector *self, PyObject *args, PyObject *kwds)
@@ -228,7 +224,7 @@ dmnsn_py_Vector_negative(PyObject *rhs)
return (PyObject *)ret;
}
-static PyObject *
+PyObject *
dmnsn_py_Vector_cross(PyObject *self, PyObject *args)
{
dmnsn_py_Vector *lhs, *rhs;
@@ -244,7 +240,7 @@ dmnsn_py_Vector_cross(PyObject *self, PyObject *args)
return (PyObject *)ret;
}
-static PyObject *
+PyObject *
dmnsn_py_Vector_dot(PyObject *self, PyObject *args)
{
dmnsn_py_Vector *lhs, *rhs;
@@ -256,7 +252,7 @@ dmnsn_py_Vector_dot(PyObject *self, PyObject *args)
return PyFloat_FromDouble(dmnsn_vector_dot(lhs->v, rhs->v));
}
-static PyObject *
+PyObject *
dmnsn_py_Vector_proj(PyObject *self, PyObject *args)
{
dmnsn_py_Vector *u, *d;
@@ -331,7 +327,7 @@ static PyGetSetDef dmnsn_py_Vector_getsetters[] = {
{ NULL }
};
-static PyTypeObject dmnsn_py_VectorType = {
+PyTypeObject dmnsn_py_VectorType = {
PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "dimension.Vector",
.tp_basicsize = sizeof(dmnsn_py_Vector),
@@ -346,7 +342,7 @@ static PyTypeObject dmnsn_py_VectorType = {
.tp_init = (initproc)dmnsn_py_Vector_init,
};
-static bool
+bool
dmnsn_py_init_VectorType(void)
{
dmnsn_py_VectorType.tp_new = PyType_GenericNew;