Commit a6c29fd2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 335063c9
...@@ -42,11 +42,16 @@ from ZODB.utils import u64 ...@@ -42,11 +42,16 @@ from ZODB.utils import u64
from wendelin.lib.zodb import zconn_at from wendelin.lib.zodb import zconn_at
# _ZBigFile is helper for ZBigFile - just redirect loadblk/storeblk back # _ZBigFile is base class for ZBigFile that provides BigFile-line base.
# (because it is not possible to inherit from both Persistent and BigFile at
# the same time - see below)
# #
# XXX + wcfs # The other base line is from Persistent. It is not possible to inherit from
# both Persistent and BigFile at the same time since both types are C types and
# their layouts conflict.
#
# _ZBigFile:
#
# - redirects loadblk/storeblk calls to ZBigFile.
# - provides blkmmapper with WCFS integration.
cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]: cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
cdef object zself # reference to ZBigFile cdef object zself # reference to ZBigFile
# cdef wcfs.Oid foid # = .zself._p_oid # cdef wcfs.Oid foid # = .zself._p_oid
...@@ -70,10 +75,10 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]: ...@@ -70,10 +75,10 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
def storeblk(self, blk, buf): return self.zself.storeblk(blk, buf) def storeblk(self, blk, buf): return self.zself.storeblk(blk, buf)
#def blkmmapper(self): return self.zself.blkmmapper() #def blkmmapper(self): return self.zself.blkmmapper()
# blkmapper serves PyBigFile and gives it XXX ... # blkmmapper serves PyBigFile and gives it XXX ...
# #
# it is called from PyBigFile.fileh_open(mmap_overlay=True) and .zfile # it is called from PyBigFile.fileh_open(mmap_overlay=True) and .zfile
# should be already associaed with jar and have oid. # should be already associated with jar and have oid.
def blkmmapper(_ZBigFile zf): def blkmmapper(_ZBigFile zf):
cdef wcfs.PyFileH pywfileh cdef wcfs.PyFileH pywfileh
if zf.wfileh == nil: if zf.wfileh == nil:
......
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