Commit e3952ffb authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d58c048b
......@@ -91,13 +91,26 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
pywfileh = pywconn.open(zf.zself._p_oid)
zf.wfileh = pywfileh.wfileh
# return XXX
# functions that we give to virtmem bigfile_ops .mmap*
# zf is ready to serve mmap requests via .wfileh
# return pycapsule with corresponding mmap methods.
#
# the capsule is not bound to particula _ZBigFile object because
# .mmap_* methods receive BigFile* argument which they upcaset to _ZBigFile.
return _ZBigFile_mmap_pycapsule
# _ZBigFile_mmap_pycapsule is pycapsule with functions that we give to
# PyBigFile for virtmem .mmap* ops.
cdef extern from "<wendelin/bigfile/file.h>" nogil:
struct bigfile_ops:
pass
cdef extern from * nogil:
"""
extern bigfile_ops ZBigFile_mmap_ops;
"""
const bigfile_ops ZBigFile_mmap_ops
from cpython cimport PyCapsule_New
cdef object _ZBigFile_mmap_pycapsule = PyCapsule_New(&ZBigFile_mmap_ops, "bigfile.blkmmaper", NULL)
# pywconnOf establishes and returns (py) wcfs.Conn associated with zconn.
......
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