Commit 8dab9f7f authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6a717cb2
...@@ -18,20 +18,33 @@ ...@@ -18,20 +18,33 @@
# #
# See COPYING file for full licensing terms. # See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options. # See https://www.nexedi.com/licensing for rationale and options.
# cython: language_level=2
# distutils: language=c++
"""XXX""" """XXX"""
from wendelin.bigfile import BigFile #from wendelin.bigfile import BigFile
cdef extern from "bigfile/_bigfile.h":
ctypedef extern class _bigfile.BigFile[object PyBigFile]:
pass
# helper for ZBigFile - just redirect loadblk/storeblk back # helper for ZBigFile - just redirect loadblk/storeblk back
# (because it is not possible to inherit from both Persistent and BigFile at # (because it is not possible to inherit from both Persistent and BigFile at
# the same time - see below) # the same time - see below)
class _ZBigFile(BigFile): cdef class _ZBigFile(BigFile):
# .zself - reference to ZBigFile # .zself - reference to ZBigFile
"""
def __new__(cls, zself, blksize): def __new__(cls, zself, blksize):
obj = BigFile.__new__(cls, blksize) obj = BigFile.__new__(cls, blksize)
obj.zself = zself obj.zself = zself
return obj return obj
"""
def __cinit__(self, zself, blksize):
BigFile.__cinit__(self, blksize)
self.zself = zself
# redirect load/store/mapper to main class # redirect load/store/mapper to main class
def loadblk(self, blk, buf): return self.zself.loadblk(blk, buf) def loadblk(self, blk, buf): return self.zself.loadblk(blk, buf)
......
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