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
6906344b
Commit
6906344b
authored
Nov 26, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
487091b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
wcfs/internal/_wcfs.pyx
wcfs/internal/_wcfs.pyx
+26
-1
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+3
-0
No files found.
wcfs/internal/_wcfs.pyx
View file @
6906344b
...
...
@@ -33,12 +33,21 @@ cdef extern from *:
ctypedef
bint
cbool
"bool"
from
libc.stdio
cimport
printf
# XXX temp
from
libc.stdint
cimport
int64_t
,
uint64_t
# XXX -> pygolang
cdef
extern
from
"wcfs_misc.h"
namespace
"io"
nogil
:
error
EOF
"io::EOF_"
error
ErrUnexpectedEOF
cdef
extern
from
"wcfs_misc.h"
namespace
"zodb"
nogil
:
ctypedef
uint64_t
Tid
ctypedef
uint64_t
Oid
cdef
extern
from
"wcfs_misc.h"
nogil
:
const
Tid
TidHead
cdef
extern
from
"wcfs_watchlink.h"
nogil
:
cppclass
_WatchLink
:
error
close
()
...
...
@@ -52,7 +61,9 @@ cdef extern from "wcfs_watchlink.h" nogil:
pair
[
string
,
error
]
sendReq
"_ptr()->sendReq"
(
context
.
Context
ctx
,
const
string
&
req
)
cppclass
PinReq
:
pass
Oid
foid
int64_t
blk
Tid
at
cdef
extern
from
"wcfs.h"
nogil
:
...
...
@@ -126,6 +137,20 @@ cdef class PyWatchLink:
cdef
class
PyPinReq
:
cdef
PinReq
pinreq
property
foid
:
def
__get__
(
PyPinReq
pypin
):
return
pypin
.
pinreq
.
foid
# XXX -> oid bytes
property
blk
:
def
__get__
(
PyPinReq
pypin
):
return
pypin
.
pinreq
.
blk
property
at
:
def
__get__
(
PyPinReq
pypin
):
at
=
pypin
.
pinreq
.
at
if
at
==
TidHead
:
return
None
return
at
# XXX -> tid bytes
# ---- misc ----
...
...
wcfs/wcfs_test.py
View file @
6906344b
...
...
@@ -732,6 +732,8 @@ class tWatchLink(wcfs.WatchLink):
t
.
tdb
.
_wlinks
.
remove
(
t
)
super
(
tWatchLink
,
t
).
close
()
# XXX just wrap req.at with tAt inpace
"""
# recvReq is the same as WatchLink.recvReq but returns tSrvReq instead of PinReq.
def recvReq(t, ctx): # -> tSrvReq | None when EOF
req = super(tWatchLink, t).recvReq(ctx)
...
...
@@ -748,6 +750,7 @@ class tSrvReq(wcfs.PinReq):
if at is not None:
at = tAt(req.wlink.tdb, at)
return foid, blk, at
"""
...
...
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