Removed some unneeded header files and reedited with a fixed-width font
from emacs as per recomendation from GvR
This commit is contained in:
parent
8c0710fdd3
commit
5817f8f717
|
@ -35,8 +35,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|||
The item type is restricted to simple C types like int or float */
|
||||
|
||||
#include "Python.h"
|
||||
#include "modsupport.h"
|
||||
#include "ceval.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
#include <stddef.h>
|
||||
#else
|
||||
|
@ -327,7 +326,8 @@ ins1(self, where, v)
|
|||
if ((*self->ob_descr->setitem)(self, -1, v) < 0)
|
||||
return -1;
|
||||
items = self->ob_item;
|
||||
PyMem_RESIZE(items, char, (self->ob_size+1) * self->ob_descr->itemsize);
|
||||
PyMem_RESIZE(items, char,
|
||||
(self->ob_size+1) * self->ob_descr->itemsize);
|
||||
if (items == NULL) {
|
||||
PyErr_NoMemory();
|
||||
return -1;
|
||||
|
@ -780,7 +780,8 @@ array_remove(self, args)
|
|||
}
|
||||
for (i = 0; i < self->ob_size; i++) {
|
||||
if (PyObject_Compare(self->ob_item[i], args) == 0) {
|
||||
if (array_ass_slice(self, i, i+1, (PyObject *)NULL) != 0)
|
||||
if (array_ass_slice(self, i, i+1,
|
||||
(PyObject *)NULL) != 0)
|
||||
return NULL;
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
@ -945,7 +946,8 @@ array_fromstring(self, args)
|
|||
}
|
||||
self->ob_item = item;
|
||||
self->ob_size += n;
|
||||
memcpy(item + (self->ob_size - n) * itemsize, str, itemsize*n);
|
||||
memcpy(item + (self->ob_size - n) * itemsize,
|
||||
str, itemsize*n);
|
||||
}
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
|
@ -997,8 +999,10 @@ array_getattr(a, name)
|
|||
if (strcmp(name, "__members__") == 0) {
|
||||
PyObject *list = PyList_New(2);
|
||||
if (list) {
|
||||
PyList_SetItem(list, 0, PyString_FromString("typecode"));
|
||||
PyList_SetItem(list, 1, PyString_FromString("itemsize"));
|
||||
PyList_SetItem(list, 0,
|
||||
PyString_FromString("typecode"));
|
||||
PyList_SetItem(list, 1,
|
||||
PyString_FromString("itemsize"));
|
||||
if (PyErr_Occurred()) {
|
||||
Py_DECREF(list);
|
||||
list = NULL;
|
||||
|
@ -1161,7 +1165,8 @@ a_array(self, args)
|
|||
return a;
|
||||
}
|
||||
}
|
||||
PyErr_SetString(PyExc_ValueError, "bad typecode (must be c, b, h, l, f or d)");
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"bad typecode (must be c, b, h, l, f or d)");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue