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
5c3038eb
Commit
5c3038eb
authored
Jan 08, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d64280c6
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
1 deletion
+19
-1
wcfs/internal/_wcfs.pxd
wcfs/internal/_wcfs.pxd
+4
-1
wcfs/internal/_wcfs.pyx
wcfs/internal/_wcfs.pyx
+7
-0
wcfs/internal/wcfs.cpp
wcfs/internal/wcfs.cpp
+4
-0
wcfs/internal/wcfs.h
wcfs/internal/wcfs.h
+4
-0
No files found.
wcfs/internal/_wcfs.pxd
View file @
5c3038eb
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
# pinner) is verified when running wendelin.core array tests in wcfs mode.
# pinner) is verified when running wendelin.core array tests in wcfs mode.
from
golang
cimport
chan
,
structZ
,
string
,
error
,
refptr
from
golang
cimport
chan
,
structZ
,
string
,
error
,
refptr
from
golang
cimport
context
from
golang
cimport
context
,
cxx
from
libc.stdint
cimport
int64_t
,
uint64_t
,
uint8_t
from
libc.stdint
cimport
int64_t
,
uint64_t
,
uint8_t
from
libcpp.utility
cimport
pair
from
libcpp.utility
cimport
pair
...
@@ -123,6 +123,9 @@ cdef extern from "wcfs/internal/wcfs.h" namespace "wcfs" nogil:
...
@@ -123,6 +123,9 @@ cdef extern from "wcfs/internal/wcfs.h" namespace "wcfs" nogil:
void
unmap
"_ptr()->unmap"
()
void
unmap
"_ptr()->unmap"
()
cxx
.
dict
[
int64_t
,
Tid
]
_tfileh_pinned
(
FileH
wfileh
)
# ---- python bits ----
# ---- python bits ----
cdef
class
PyWCFS
:
cdef
class
PyWCFS
:
...
...
wcfs/internal/_wcfs.pyx
View file @
5c3038eb
...
@@ -33,6 +33,7 @@ cdef extern from *:
...
@@ -33,6 +33,7 @@ cdef extern from *:
from
ZODB.utils
import
p64
,
u64
from
ZODB.utils
import
p64
,
u64
from
cpython
cimport
PyBuffer_FillInfo
from
cpython
cimport
PyBuffer_FillInfo
from
libcpp.unordered_map
cimport
unordered_map
# XXX hack, why it is needed? (likely top-level wendelin.* redirector
# XXX hack, why it is needed? (likely top-level wendelin.* redirector
#from wcfs.internal._wcfs cimport *
#from wcfs.internal._wcfs cimport *
...
@@ -109,6 +110,12 @@ cdef class PyFileH:
...
@@ -109,6 +110,12 @@ cdef class PyFileH:
pywmmap
.
wmmap
=
wmmap
pywmmap
.
wmmap
=
wmmap
return
pywmmap
return
pywmmap
# XXX for tests
property
pinned
:
def
__get__
(
PyFileH
pywfileh
):
# XXX cast: needed for cython to automatically convert to py dict
return
<
unordered_map
[
int64_t
,
Tid
]
>
_tfileh_pinned
(
pywfileh
.
wfileh
)
cdef
class
PyMapping
:
cdef
class
PyMapping
:
...
...
wcfs/internal/wcfs.cpp
View file @
5c3038eb
...
@@ -595,4 +595,8 @@ void _Mapping::decref() {
...
@@ -595,4 +595,8 @@ void _Mapping::decref() {
}
}
dict
<
int64_t
,
zodb
::
Tid
>
_tfileh_pinned
(
FileH
fileh
)
{
return
fileh
->
_pinned
;
}
}
// wcfs::
}
// wcfs::
wcfs/internal/wcfs.h
View file @
5c3038eb
...
@@ -187,6 +187,10 @@ public:
...
@@ -187,6 +187,10 @@ public:
};
};
// for testing
dict
<
int64_t
,
zodb
::
Tid
>
_tfileh_pinned
(
FileH
fileh
);
}
// wcfs::
}
// wcfs::
#endif
#endif
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