Commit c6c69c5a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a6c29fd2
......@@ -54,15 +54,14 @@ from wendelin.lib.zodb import zconn_at
# - provides blkmmapper with WCFS integration.
cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
cdef object zself # reference to ZBigFile
# cdef wcfs.Oid foid # = .zself._p_oid
cdef wcfs.FileH wfileh # WCFS file handle. Initially nil, opened by blkmmapper
# _new creates new _ZBigFile associated with ZBigFile zself.
# XXX Cython does not allow __new__ nor to change arguments passed to __cinit__ / __init__
@staticmethod
def _new(zself, blksize):
cdef _ZBigFile obj = _ZBigFile.__new__(_ZBigFile, blksize)
obj.zself = zself
# obj.foid = -1 # Note: zself._p_oid could be yet None for newly created ZBigFile
obj.wfileh = nil
return obj
......@@ -70,12 +69,13 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
zf.wfileh = nil
# redirect load/store/mapper to main class
# redirect load/store to main class
def loadblk(self, blk, buf): return self.zself.loadblk(blk, buf)
def storeblk(self, blk, buf): return self.zself.storeblk(blk, buf)
#def blkmmapper(self): return self.zself.blkmmapper()
# blkmmapper serves PyBigFile and gives it XXX ...
# blkmmapper returns pycapsule with virtmem mmapper for the file.
#
# XXX
#
# it is called from PyBigFile.fileh_open(mmap_overlay=True) and .zfile
# should be already associated with jar and have oid.
......@@ -85,7 +85,6 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
zconn = zf.zself._p_jar
assert zconn is not None
# XXX locking? or rely on that ZODB objects for must be used from under 1 thread only?
# zf.foid = u64(zf.zself._p_oid)
# join zconn to wconn; link to wconn from _ZBigFile
pywconn = pywconnOf(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