Commit 5d062210 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8d15be09
......@@ -929,7 +929,7 @@ pyfileh_open(PyObject *pyfile0, PyObject *args)
return NULL;
Py_INCREF(pyfile);
err = fileh_open(&pyfileh->fileh, pyfile, ram, DONT_MMAP_OVERLAY); // XXX -> MMAP_OVERLAY if requested
err = fileh_open(&pyfileh->fileh, &pyfile->file, ram, DONT_MMAP_OVERLAY); // XXX -> MMAP_OVERLAY if requested
if (err) {
XPyErr_SetFromErrno();
Py_DECREF(pyfile);
......@@ -937,7 +937,7 @@ pyfileh_open(PyObject *pyfile0, PyObject *args)
return NULL;
}
return pyfileh;
return &pyfileh->pyobj;
}
......@@ -952,18 +952,18 @@ pyfile_new(PyTypeObject *type, PyObject *args, PyObject *kw)
// FIXME "k" = unsigned long - we need size_t
static char *kw_list[] = {"blksize", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kw, "k", kw_list, &self->blksize)) {
if (!PyArg_ParseTupleAndKeywords(args, kw, "k", kw_list, &self->file.blksize)) {
Py_DECREF(self);
return NULL;
}
self->file_ops = &pybigfile_ops;
return self;
self->file.file_ops = &pybigfile_ops;
return &self->pyobj;
}
static PyMemberDef pyfile_members[] = {
{"blksize", T_ULONG /* XXX vs typeof(blksize) = size_t ? */, offsetof(PyBigFile, blksize), READONLY, "block size"},
{"blksize", T_ULONG /* XXX vs typeof(blksize) = size_t ? */, offsetof(PyBigFile, file.blksize), READONLY, "block size"},
{NULL}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment