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
19eaac56
Commit
19eaac56
authored
Nov 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cc1a98cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
wcfs/internal/_wcfs.pyx
wcfs/internal/_wcfs.pyx
+20
-1
No files found.
wcfs/internal/_wcfs.pyx
View file @
19eaac56
...
...
@@ -25,6 +25,7 @@
from
libcpp
cimport
nullptr_t
,
nullptr
as
nil
from
libcpp.string
cimport
string
from
libcpp.utility
cimport
pair
cdef
extern
from
*
:
ctypedef
bint
cbool
"bool"
...
...
@@ -36,16 +37,31 @@ cdef extern from "wcfs_misc.h" nogil:
cbool
operator
==
(
const
error
&
)
const
cbool
operator
!=
(
const
error
&
)
const
cdef
extern
from
"wcfs_watchlink.h"
nogil
:
cppclass
WatchLink
:
error
close
()
ctypedef
WatchLink
*
pWatchLink
# https://github.com/cython/cython/issues/534
cdef
extern
from
"wcfs.h"
nogil
:
cppclass
WCFS
:
pair
[
pWatchLink
,
error
]
_openwatch
()
# XXX pair instead of tuple
from
golang
cimport
topyexc
cdef
class
PyWCFS
:
cdef
WCFS
*
wc
cdef
class
PyWatchLink
:
cdef
WatchLink
*
wlink
def
__xinit__
(
PyWatchLink
pywlink
,
PyWCFS
pywc
):
_
=
wcfs_openwatch_pyexc
(
pywc
.
wc
)
# XXX
def
close
(
PyWatchLink
pywlink
):
with
nogil
:
err
=
wlink_close_pyexc
(
pywlink
.
wlink
)
...
...
@@ -63,5 +79,8 @@ cdef class PyPinReq:
cdef
nogil
:
error
wlink_close_pyexc
(
WatchLink
*
wlink
)
except
+
topyexc
:
error
wlink_close_pyexc
(
WatchLink
*
wlink
)
except
+
topyexc
:
return
wlink
.
close
()
pair
[
pWatchLink
,
error
]
wcfs_openwatch_pyexc
(
WCFS
*
wcfs
)
except
+
topyexc
:
return
wcfs
.
_openwatch
()
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