Conform the new module to /the/ C style.
Noone but me cares, but Guido said to go ahead and fix it if it bothered me.
This commit is contained in:
parent
0d36206afd
commit
9fdcf4ad39
@ -17,7 +17,8 @@ typedef struct {
|
|||||||
staticforward PyTypeObject XReadlinesObject_Type;
|
staticforward PyTypeObject XReadlinesObject_Type;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xreadlines_dealloc(PyXReadlinesObject *op) {
|
xreadlines_dealloc(PyXReadlinesObject *op)
|
||||||
|
{
|
||||||
Py_XDECREF(op->file);
|
Py_XDECREF(op->file);
|
||||||
Py_XDECREF(op->lines);
|
Py_XDECREF(op->lines);
|
||||||
PyObject_DEL(op);
|
PyObject_DEL(op);
|
||||||
@ -27,7 +28,8 @@ xreadlines_dealloc(PyXReadlinesObject *op) {
|
|||||||
#define CHUNKSIZE 8192
|
#define CHUNKSIZE 8192
|
||||||
|
|
||||||
static PyXReadlinesObject *
|
static PyXReadlinesObject *
|
||||||
newreadlinesobject(PyObject *file) {
|
newreadlinesobject(PyObject *file)
|
||||||
|
{
|
||||||
PyXReadlinesObject *op;
|
PyXReadlinesObject *op;
|
||||||
op = PyObject_NEW(PyXReadlinesObject, &XReadlinesObject_Type);
|
op = PyObject_NEW(PyXReadlinesObject, &XReadlinesObject_Type);
|
||||||
if (op == NULL)
|
if (op == NULL)
|
||||||
@ -40,7 +42,8 @@ newreadlinesobject(PyObject *file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
xreadlines(PyObject *self, PyObject *args) {
|
xreadlines(PyObject *self, PyObject *args)
|
||||||
|
{
|
||||||
PyObject *file;
|
PyObject *file;
|
||||||
PyXReadlinesObject *ret;
|
PyXReadlinesObject *ret;
|
||||||
|
|
||||||
@ -51,8 +54,9 @@ xreadlines(PyObject *self, PyObject *args) {
|
|||||||
return (PyObject*)ret;
|
return (PyObject*)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject*
|
static PyObject *
|
||||||
xreadlines_item(PyXReadlinesObject *a, int i) {
|
xreadlines_item(PyXReadlinesObject *a, int i)
|
||||||
|
{
|
||||||
if (i != a->abslineno) {
|
if (i != a->abslineno) {
|
||||||
PyErr_SetString(PyExc_RuntimeError,
|
PyErr_SetString(PyExc_RuntimeError,
|
||||||
"xreadlines object accessed out of order");
|
"xreadlines object accessed out of order");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user