Cleanup: use named unsigned types in the Python API

This commit is contained in:
2020-02-20 15:38:58 +11:00
parent 1e3ffd1f87
commit 2a6df7dfe5
28 changed files with 152 additions and 162 deletions

View File

@@ -38,9 +38,9 @@
typedef struct {
PyObject_HEAD KDTree_3d *obj;
unsigned int maxsize;
unsigned int count;
unsigned int count_balance; /* size when we last balanced */
uint maxsize;
uint count;
uint count_balance; /* size when we last balanced */
} PyKDTree;
/* -------------------------------------------------------------------- */
@@ -92,7 +92,7 @@ static PyObject *kdtree_nearest_to_py_and_check(const KDTreeNearest_3d *nearest)
static int PyKDTree__tp_init(PyKDTree *self, PyObject *args, PyObject *kwargs)
{
unsigned int maxsize;
uint maxsize;
const char *keywords[] = {"size", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "I:KDTree", (char **)keywords, &maxsize)) {
@@ -273,7 +273,7 @@ static PyObject *py_kdtree_find_n(PyKDTree *self, PyObject *args, PyObject *kwar
PyObject *py_co;
float co[3];
KDTreeNearest_3d *nearest;
unsigned int n;
uint n;
int i, found;
const char *keywords[] = {"co", "n", NULL};