Commit a8b88bc3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b07298d7
......@@ -73,6 +73,10 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
def loadblk(self, blk, buf): return self.zself.loadblk(blk, buf)
def storeblk(self, blk, buf): return self.zself.storeblk(blk, buf)
# blkmmapper is pycapsule with virtmem mmapper for the file.
# it relies on .wfileh being initialized by .fileh_open()
blkmmapper = PyCapsule_New(<void*>&ZBigFile_mmap_ops, "bigfile.blkmmaper", NULL)
# fileh_open wraps BigFile.fileh_open and makes sure that WCFS file handle
# corresponding to ZBigFile is opened if use_wcfs=True.
def fileh_open(_ZBigFile zf, bint use_wcfs):
......@@ -93,7 +97,9 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
return super(_ZBigFile, zf).fileh_open(mmap_overlay)
# blkmmapper returns pycapsule with virtmem mmapper for the file.
"""
# blkmmapper is pycapsule with virtmem mmapper for the file.
# it relies on .wfileh being initialized by .fileh_open()
@staticmethod
def blkmmapper():
# def blkmmapper(_ZBigFile zf):
......@@ -118,6 +124,7 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
# the capsule is not bound to particular _ZBigFile object because
# .mmap_* methods receive BigFile* argument which they upcast to _ZBigFile.
return _ZBigFile_mmap_pycapsule
"""
# _ZBigFile_mmap_pycapsule is pycapsule with functions that we give to
......@@ -131,8 +138,8 @@ cdef extern from * nogil:
"""
const bigfile_ops ZBigFile_mmap_ops
from cpython cimport PyCapsule_New
cdef object _ZBigFile_mmap_pycapsule = PyCapsule_New(
<void*>&ZBigFile_mmap_ops, "bigfile.blkmmaper", NULL)
#cdef object _ZBigFile_mmap_pycapsule = PyCapsule_New(
# <void*>&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