Commit 5d67756e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4bfc6d73
......@@ -106,6 +106,7 @@ cdef extern from "wcfs/internal/wcfs.h" namespace "wcfs" nogil:
pair[Mapping, error] mmap "_ptr()->mmap" (int64_t blk_start, int64_t blk_len)
cppclass _Mapping:
FileH fileh
int64_t blk_start
int64_t blk_stop() const
uint8_t *mem_start
......@@ -115,6 +116,7 @@ cdef extern from "wcfs/internal/wcfs.h" namespace "wcfs" nogil:
cppclass Mapping (refptr[_Mapping]):
# Mapping.X = Mapping->X in C++
FileH fileh "_ptr()->fileh"
int64_t blk_start "_ptr()->blk_start"
int64_t blk_stop "_ptr()->blk_stop" () const
uint8_t *mem_start "_ptr()->mem_start"
......@@ -139,6 +141,7 @@ cdef class PyFileH:
cdef class PyMapping:
cdef Mapping wmmap
cdef readonly PyFileH fileh
cdef class PyWatchLink:
cdef WatchLink wlink
......
......@@ -106,8 +106,11 @@ cdef class PyFileH:
if err != nil:
raise pyerr(err)
assert wmmap.fileh .eq (pywfileh.wfileh)
cdef PyMapping pywmmap = PyMapping.__new__(PyMapping)
pywmmap.wmmap = wmmap
pywmmap.fileh = pywfileh
return pywmmap
# XXX for tests
......
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