Commit e62653d7 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 56a76f96
......@@ -113,7 +113,7 @@ static Py_ssize_t
pyvma_getbuf(PyObject *pyvma0, Py_ssize_t segment, void **pptr)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
VMA *vma = &pyvma->vma;
VMA *vma = &pyvma->vma;
if (segment) {
PyErr_SetString(PyExc_SystemError, "access to non-zero vma segment");
......@@ -129,7 +129,7 @@ static Py_ssize_t
pyvma_getsegcount(PyObject *pyvma0, Py_ssize_t *lenp)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
VMA *vma = &pyvma->vma;
VMA *vma = &pyvma->vma;
if (lenp)
*lenp = vma->addr_stop - vma->addr_start;
......@@ -142,7 +142,7 @@ static int
pyvma_getbuffer(PyObject *pyvma0, Py_buffer *view, int flags)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
VMA *vma = &pyvma->vma;
VMA *vma = &pyvma->vma;
return PyBuffer_FillInfo(view, &pyvma->pyobj,
(void *)vma->addr_start, vma->addr_stop - vma->addr_start,
......@@ -155,7 +155,7 @@ static Py_ssize_t
pyvma_len(PyObject *pyvma0)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
VMA *vma = &pyvma->vma;
VMA *vma = &pyvma->vma;
return vma->addr_stop - vma->addr_start;
}
......@@ -185,7 +185,7 @@ PyFunc(pyvma_filerange, "filerange() -> (pgoffset, pglen) -- file range this vma
(PyObject *pyvma0, PyObject *args)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
VMA *vma = &pyvma->vma;
VMA *vma = &pyvma->vma;
Py_ssize_t pgoffset, pglen; // XXX Py_ssize_t vs pgoff_t
pgoffset = vma->f_pgoffset;
......@@ -200,7 +200,7 @@ PyFunc(pyvma_pagesize, "pagesize() -> pagesize -- page size of RAM underlying th
(PyObject *pyvma0, PyObject *args)
{
PyVMA *pyvma = container_of(pyvma0, PyVMA, pyobj);
VMA *vma = &pyvma->vma;
VMA *vma = &pyvma->vma;
Py_ssize_t pagesize = vma->fileh->ramh->ram->pagesize;
return Py_BuildValue("n", pagesize);
......@@ -286,7 +286,7 @@ static /*const*/ PyMemberDef pyvma_members[] = {
{"addr_start", T_UINTPTR, offsetof(PyVMA, vma.addr_start), READONLY, "vma's start addr"},
{"addr_stop", T_UINTPTR, offsetof(PyVMA, vma.addr_stop), READONLY, "vma's start addr"},
// XXX pyuser: restrict to read-only access?
{"pyuser", T_OBJECT_EX, offsetof(PyVMA, pyuser), 0, "user of this vma"},
{"pyuser", T_OBJECT_EX, offsetof(PyVMA, pyuser), 0, "user of this vma"},
{NULL}
};
......@@ -347,7 +347,7 @@ PyFunc(pyfileh_dirty_writeout,
(PyObject *pyfileh0, PyObject *args)
{
PyBigFileH *pyfileh = container_of(pyfileh0, PyBigFileH, pyobj);
BigFileH *fileh = &pyfileh->fileh;
BigFileH *fileh = &pyfileh->fileh;
long flags;
int err;
......@@ -370,7 +370,7 @@ PyFunc(pyfileh_dirty_discard, "dirty_discard() - discard changes made to fileh m
(PyObject *pyfileh0, PyObject *args)
{
PyBigFileH *pyfileh = container_of(pyfileh0, PyBigFileH, pyobj);
BigFileH *fileh = &pyfileh->fileh;
BigFileH *fileh = &pyfileh->fileh;
if (!PyArg_ParseTuple(args, ""))
return NULL;
......@@ -384,7 +384,7 @@ PyFunc(pyfileh_isdirty, "isdirty() - are there any changes to fileh memory at al
(PyObject *pyfileh0, PyObject *args)
{
PyBigFileH *pyfileh = container_of(pyfileh0, PyBigFileH, pyobj);
BigFileH *fileh = &pyfileh->fileh;
BigFileH *fileh = &pyfileh->fileh;
if (!PyArg_ParseTuple(args, ""))
return NULL;
......@@ -416,8 +416,8 @@ pyfileh_dealloc(PyObject *pyfileh0)
/* PyBigFileH does not support cyclic GC - no need to PyObject_GC_UnTrack it */
PyBigFileH *pyfileh = container_of(pyfileh0, PyBigFileH, pyobj);
BigFileH *fileh = &pyfileh->fileh;
BigFile *file = fileh->file;
BigFileH *fileh = &pyfileh->fileh;
BigFile *file = fileh->file;
PyBigFile *pyfile;
if (pyfileh->in_weakreflist)
......
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