Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
a8b88bc3
Commit
a8b88bc3
authored
Dec 19, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b07298d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+10
-3
No files found.
bigfile/_file_zodb.pyx
View file @
a8b88bc3
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment