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
f443ae81
Commit
f443ae81
authored
Dec 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5a975bb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
18 deletions
+26
-18
bigfile/_file_zodb.pyx
bigfile/_file_zodb.pyx
+26
-18
No files found.
bigfile/_file_zodb.pyx
View file @
f443ae81
...
...
@@ -34,20 +34,26 @@ cdef extern from "bigfile/_bigfile.h":
ctypedef extern class wendelin.bigfile._bigfile.BigFile[object PyBigFile]:
pass
"""
# FIXME hack, keep in sync with PyBigFile
cdef
extern
from
*
:
"""
#include <wendelin/bigfile/file.h>
#include <wendelin/bigfile/virtmem.h>
struct cxxPyBigFile {
PyObject pyobj;
BigFile file;
};
"""
struct
cxxPyBigFile
:
## FIXME hack, keep in sync with PyBigFile
#cdef extern from *:
# """
# #include <wendelin/bigfile/file.h>
# #include <wendelin/bigfile/virtmem.h>
#
# struct cxxPyBigFile {
# PyObject pyobj;
# BigFile file;
# };
# """
# struct cxxPyBigFile:
# pass
# ctypedef extern class wendelin.bigfile._bigfile.BigFile[object cxxPyBigFile]:
# pass
cdef
extern
from
"bigfile/_bigfile.h"
:
struct
PyBigFile
:
pass
ctypedef
extern
class
wendelin
.
bigfile
.
_bigfile
.
BigFile
[
object
cxx
PyBigFile
]:
ctypedef
extern
class
wendelin
.
bigfile
.
_bigfile
.
BigFile
[
object
PyBigFile
]:
pass
import
wcfs
as
pywcfs
...
...
@@ -66,8 +72,8 @@ from wendelin.lib.zodb import zconn_at
# XXX + wcfs
cdef
public
class
_ZBigFile
(
BigFile
)
[
object
_ZBigFile
,
type
_ZBigFile_Type
]:
cdef
object
zself
# reference to ZBigFile
cdef
wcfs
.
Oid
foid
# = .zself._p_oid
cdef
wcfs
.
FileH
wfileh
# WCFS file handle
#
cdef wcfs.Oid foid # = .zself._p_oid
cdef
wcfs
.
FileH
wfileh
# WCFS file handle
. Initially nil, opened by blkmmapper
# XXX Cython does not allow __new__ nor to change arguments passed to __cinit__ / __init__
@
staticmethod
...
...
@@ -75,7 +81,7 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
cdef
_ZBigFile
obj
=
_ZBigFile
.
__new__
(
_ZBigFile
,
blksize
)
obj
.
zself
=
zself
# obj.foid = -1 # Note: zself._p_oid could be yet None for newly created ZBigFile
obj
.
wfileh
=
nil
# opened by blkmmapper
obj
.
wfileh
=
nil
return
obj
def
__dealloc__
(
_ZBigFile
zf
):
...
...
@@ -100,10 +106,12 @@ cdef public class _ZBigFile(BigFile) [object _ZBigFile, type _ZBigFile_Type]:
# zf.foid = u64(zf.zself._p_oid)
# join zconn to wconn; link to wconn from _ZBigFile
pywconn
=
pywconnOf
(
zconn
)
pywfileh
=
pywconn
.
open
(
zf
.
zself
.
_p_oid
)
pywconn
=
pywconnOf
(
zconn
)
pywfileh
=
pywconn
.
open
(
zf
.
zself
.
_p_oid
)
zf
.
wfileh
=
pywfileh
.
wfileh
# return XXX
# functions that we give to virtmem bigfile_ops .mmap*
cdef
extern
from
*
nogil
:
...
...
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