Commit 09310101 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9c0ea7e9
......@@ -60,7 +60,9 @@ from ZODB.utils import z64, u64, p64
from zodbtools.util import ashex as h, fromhex
from .internal import mm
from .internal._wcfs import PyWatchLink as WatchLink
from .internal._wcfs import \
PyWatchLink as WatchLink, \
PyPinReq as PinReq \
from six import reraise
......
......@@ -25,3 +25,7 @@
cdef class PyWatchLink:
pass
cdef class PyPinReq:
pass
......@@ -732,16 +732,17 @@ class tWatchLink(wcfs.WatchLink):
t.tdb._wlinks.remove(t)
super(tWatchLink, t).close()
# recvReq is the same as WatchLink.recvReq but returns tSrvReq instead of SrvReq.
# 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)
if req is not None:
assert req.__class__ is wcfs.SrvReq
assert req.__class__ is wcfs.PinReq
req.__class__ = tSrvReq
return req
class tSrvReq(wcfs.SrvReq):
# _parse is the same as SrvReq._parse, but returns at wrapped with tAt.
class tSrvReq(wcfs.PinReq):
# _parse is the same as PinReq._parse, but returns at wrapped with tAt.
# XXX -> just wrap `at`
def _parse(req): # -> (foid, blk, at|None)
foid, blk, at = super(tSrvReq, req)._parse()
if at is not None:
......
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