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
475db2ac
Commit
475db2ac
authored
Dec 19, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b48481c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
bigfile/_bigfile.c
bigfile/_bigfile.c
+26
-4
No files found.
bigfile/_bigfile.c
View file @
475db2ac
...
...
@@ -902,14 +902,35 @@ out:
}
/* PyBigFile: mmap methods.
* They redirect op X to type.blkmmapper.X without going to Python level */
static
void
*
pybigfile_mmap_setup_read
(
VMA
*
vma
,
BigFile
*
file0
,
blk_t
blk
,
size_t
blklen
)
{
BUG
();
// XXX
}
static
int
pybigfile_remmap_blk_read
(
VMA
*
vma
,
BigFile
*
file0
,
blk_t
blk
)
{
BUG
();
// XXX
}
static
void
pybigfile_munmap
(
VMA
*
vma
,
BigFile
*
file0
)
{
BUG
();
// XXX
}
static
const
struct
bigfile_ops
pybigfile_ops
=
{
.
loadblk
=
pybigfile_loadblk
,
.
storeblk
=
pybigfile_storeblk
,
// TODO .mmap*
.
mmap_setup_read
=
NULL
,
.
remmap_blk_read
=
NULL
,
.
munmap
=
NULL
,
.
mmap_setup_read
=
pybigfile_mmap_setup_read
,
.
remmap_blk_read
=
pybigfile_remmap_blk_read
,
.
munmap
=
pybigfile_munmap
,
//.release =
};
...
...
@@ -972,6 +993,7 @@ pyfile_new(PyTypeObject *type, PyObject *args, PyObject *kw)
PyObject
*
blkmmapper
;
bigfile_ops
*
blkmmap_ops
=
NULL
;
/* try to get type.blkmmapper and verify it provides IBlkMMapper interface */
blkmmapper
=
PyObject_GetAttrString
((
PyObject
*
)
type
,
"blkmmapper"
);
PyErr_Clear
();
/* GetAttr raises exception if there is no attribute */
if
(
blkmmapper
)
{
...
...
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