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
f72b7f1c
Commit
f72b7f1c
authored
Nov 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
19eaac56
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
7 deletions
+19
-7
wcfs/internal/_wcfs.pyx
wcfs/internal/_wcfs.pyx
+7
-2
wcfs/internal/wcfs.h
wcfs/internal/wcfs.h
+4
-1
wcfs/internal/wcfs_misc.h
wcfs/internal/wcfs_misc.h
+4
-0
wcfs/internal/wcfs_watchlink.cpp
wcfs/internal/wcfs_watchlink.cpp
+3
-3
wcfs/internal/wcfs_watchlink.h
wcfs/internal/wcfs_watchlink.h
+1
-1
No files found.
wcfs/internal/_wcfs.pyx
View file @
f72b7f1c
...
...
@@ -59,8 +59,13 @@ cdef class PyWatchLink:
cdef
WatchLink
*
wlink
def
__xinit__
(
PyWatchLink
pywlink
,
PyWCFS
pywc
):
_
=
wcfs_openwatch_pyexc
(
pywc
.
wc
)
# XXX
with
nogil
:
_
=
wcfs_openwatch_pyexc
(
pywc
.
wc
)
pywlink
.
wlink
=
_
.
first
err
=
_
.
second
if
err
!=
nil
:
raise
RuntimeError
(
err
.
Error
())
# XXX exc class?
def
close
(
PyWatchLink
pywlink
):
with
nogil
:
...
...
wcfs/internal/wcfs.h
View file @
f72b7f1c
...
...
@@ -28,6 +28,9 @@ using std::string;
#include <tuple>
using
std
::
tuple
;
#include <utility>
using
std
::
pair
;
#include "wcfs_misc.h"
struct
Conn
;
...
...
@@ -42,7 +45,7 @@ struct WCFS {
tuple
<
Conn
*
,
error
>
connect
(
zodb
::
Tid
at
);
string
_path
(
const
string
&
obj
);
tuple
<
os
::
File
,
error
>
_open
(
const
string
&
path
,
int
flags
=
O_RDONLY
);
tuple
<
WatchLink
*
,
error
>
_openwatch
();
pair
<
WatchLink
*
,
error
>
_openwatch
();
};
...
...
wcfs/internal/wcfs_misc.h
View file @
f72b7f1c
...
...
@@ -38,6 +38,10 @@ using namespace golang;
#include <string>
using
std
::
string
;
#include <utility>
using
std
::
pair
;
using
std
::
make_pair
;
#include <tuple>
using
std
::
tuple
;
using
std
::
make_tuple
;
...
...
wcfs/internal/wcfs_watchlink.cpp
View file @
f72b7f1c
...
...
@@ -25,7 +25,7 @@
// _openwatch opens new watch link on wcfs.
tuple
<
WatchLink
*
,
error
>
WCFS
::
_openwatch
()
{
pair
<
WatchLink
*
,
error
>
WCFS
::
_openwatch
()
{
WCFS
*
wc
=
this
;
// head/watch handle.
...
...
@@ -33,7 +33,7 @@ tuple<WatchLink*, error> WCFS::_openwatch() {
error
err
;
tie
(
f
,
err
)
=
wc
->
_open
(
"head/watch"
,
O_RDWR
);
if
(
err
!=
nil
)
return
make_
tuple
((
WatchLink
*
)
NULL
,
err
);
return
make_
pair
((
WatchLink
*
)
NULL
,
err
);
WatchLink
*
wlink
=
new
(
WatchLink
);
wlink
->
_wc
=
wc
;
...
...
@@ -49,7 +49,7 @@ tuple<WatchLink*, error> WCFS::_openwatch() {
wlink->_serveWG.go(wlink._serveRX)
#endif
return
make_
tuple
(
wlink
,
nil
);
return
make_
pair
(
wlink
,
nil
);
}
void
WatchLink
::
_closeTX
()
{
...
...
wcfs/internal/wcfs_watchlink.h
View file @
f72b7f1c
...
...
@@ -85,7 +85,7 @@ class WatchLink {
#endif
public:
friend
tuple
<
WatchLink
*
,
error
>
WCFS
::
_openwatch
();
friend
pair
<
WatchLink
*
,
error
>
WCFS
::
_openwatch
();
error
close
();
error
recvReq
(
context
::
Context
*
ctx
,
PinReq
*
rx_into
);
tuple
<
string
,
error
>
sendReq
(
context
::
Context
*
ctx
,
const
string
&
req
);
...
...
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