Skip to content

Commit

Permalink
Fix quaternion_get_wxyz
Browse files Browse the repository at this point in the history
  • Loading branch information
xioTechnologies authored Sep 26, 2024
1 parent a719bcd commit fb13780
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Python/Python-C-API/Quaternion.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ static void quaternion_free(Quaternion *self) {

static PyObject *quaternion_get_wxyz(Quaternion *self) {
const npy_intp dims[] = {4};
return PyArray_SimpleNewFromData(1, dims, NPY_FLOAT, self->quaternion.array);
PyObject* array = PyArray_SimpleNewFromData(1, dims, NPY_FLOAT, self->quaternion.array);
Py_INCREF(self);
PyArray_SetBaseObject((PyArrayObject *) array, self);
return array;
}

static PyObject *quaternion_get_w(Quaternion *self) {
Expand Down

0 comments on commit fb13780

Please sign in to comment.