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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
1947412d
Commit
1947412d
authored
Dec 19, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6d1e34da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
bigfile/_bigfile.c
bigfile/_bigfile.c
+17
-1
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+1
-1
No files found.
bigfile/_bigfile.c
View file @
1947412d
...
...
@@ -905,7 +905,12 @@ out:
static
const
struct
bigfile_ops
pybigfile_ops
=
{
.
loadblk
=
pybigfile_loadblk
,
.
storeblk
=
pybigfile_storeblk
,
// XXX .mmap*
// TODO .mmap*
.
mmap_setup_read
=
NULL
,
.
remmap_blk_read
=
NULL
,
.
munmap
=
NULL
,
//.release =
};
...
...
@@ -952,6 +957,17 @@ static PyObject *
pyfile_new
(
PyTypeObject
*
type
,
PyObject
*
args
,
PyObject
*
kw
)
{
PyBigFile
*
self
;
PyObject
*
blkmmapper
;
blkmmapper
=
PyObject_GetAttrString
((
PyObject
*
)
type
,
"blkmmapper"
);
PyErr_Clear
();
/* GetAttr raises exception if there is no attribute */
if
(
blkmmapper
)
{
if
(
!
PyCapsule_IsValid
(
blkmmapper
,
"wendelin.bigfile.IBlkMMapper"
))
{
Py_DECREF
(
blkmmapper
);
return
PyErr_Format
(
PyExc_TypeError
,
"%s: .blkmmapper is not a valid pycapsule with mmap methods"
,
type
->
tp_name
);
}
}
self
=
(
PyBigFile
*
)
PyType_GenericNew
(
type
,
args
,
kw
);
if
(
!
self
)
...
...
bigfile/_file_zodb.pyx
View file @
1947412d
...
...
@@ -88,7 +88,7 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
# blkmmapper is pycapsule with virtmem mmap functions for _ZBigFile.
# The functions rely on .wfileh being initialized by .fileh_open()
blkmmapper
=
PyCapsule_New
(
<
void
*>&
ZBigFile_mmap_ops
,
"
bigfile.blkmm
aper"
,
NULL
)
blkmmapper
=
PyCapsule_New
(
<
void
*>&
ZBigFile_mmap_ops
,
"
wendelin.bigfile.IBlkMM
aper"
,
NULL
)
# fileh_open wraps BigFile.fileh_open and makes sure that WCFS file handle
# corresponding to ZBigFile is opened if use_wcfs=True.
...
...
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