formatting edits & remove debug print.

This commit is contained in:
2011-10-13 01:29:08 +00:00
parent 6955c47fac
commit 276e5f7095
28 changed files with 1331 additions and 1320 deletions

View File

@@ -95,7 +95,7 @@ static PyObject *Buffer_to_list_recursive(Buffer *self)
{
PyObject *list;
if(self->ndimensions > 1) {
if (self->ndimensions > 1) {
int i, len= self->dimensions[0];
list= PyList_New(len);
@@ -213,7 +213,7 @@ PyTypeObject BGL_bufferType = {
static PyObject *Method_##funcname (PyObject *UNUSED(self), PyObject *args) {\
arg_def##nargs arg_list; \
ret_def_##ret; \
if(!PyArg_ParseTuple(args, arg_str##nargs arg_list, arg_ref##nargs arg_list)) return NULL;\
if (!PyArg_ParseTuple(args, arg_str##nargs arg_list, arg_ref##nargs arg_list)) return NULL;\
ret_set_##ret gl##funcname (arg_var##nargs arg_list);\
ret_ret_##ret; \
}
@@ -222,7 +222,7 @@ static PyObject *Method_##funcname (PyObject *UNUSED(self), PyObject *args) {\
static PyObject *Method_##funcname (PyObject *UNUSED(self), PyObject *args) {\
arg_def##nargs arg_list; \
ret_def_##ret; \
if(!PyArg_ParseTuple(args, arg_str##nargs arg_list, arg_ref##nargs arg_list)) return NULL;\
if (!PyArg_ParseTuple(args, arg_str##nargs arg_list, arg_ref##nargs arg_list)) return NULL;\
ret_set_##ret glu##funcname (arg_var##nargs arg_list);\
ret_ret_##ret; \
}
@@ -289,7 +289,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject
int type;
Py_ssize_t i, ndimensions = 0;
if(kwds && PyDict_Size(kwds)) {
if (kwds && PyDict_Size(kwds)) {
PyErr_SetString(PyExc_TypeError,
"bgl.Buffer(): takes no keyword args");
return NULL;
@@ -307,7 +307,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject
if (PyLong_Check(length_ob)) {
ndimensions= 1;
if(((dimensions[0]= PyLong_AsLong(length_ob)) < 1)) {
if (((dimensions[0]= PyLong_AsLong(length_ob)) < 1)) {
PyErr_SetString(PyExc_AttributeError,
"dimensions must be between 1 and "STRINGIFY(MAX_DIMENSIONS));
return NULL;
@@ -332,7 +332,7 @@ static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject
else dimensions[i]= PyLong_AsLong(ob);
Py_DECREF(ob);
if(dimensions[i] < 1) {
if (dimensions[i] < 1) {
PyErr_SetString(PyExc_AttributeError,
"dimensions must be between 1 and "STRINGIFY(MAX_DIMENSIONS));
return NULL;
@@ -490,7 +490,7 @@ static int Buffer_ass_slice(Buffer *self, int begin, int end, PyObject *seq)
for (count= begin; count < end; count++) {
item= PySequence_GetItem(seq, count - begin);
if(item) {
if (item) {
err= Buffer_ass_item(self, count, item);
Py_DECREF(item);
}
@@ -1293,7 +1293,7 @@ PyObject *BPyInit_bgl(void)
submodule= PyModule_Create(&BGL_module_def);
dict= PyModule_GetDict(submodule);
if(PyType_Ready(&BGL_bufferType) < 0)
if (PyType_Ready(&BGL_bufferType) < 0)
return NULL; /* should never happen */