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
f1e4f89e
Commit
f1e4f89e
authored
Nov 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3ebe99a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
wcfs/internal/wcfs_misc.cpp
wcfs/internal/wcfs_misc.cpp
+6
-8
wcfs/internal/wcfs_misc.h
wcfs/internal/wcfs_misc.h
+3
-0
wcfs/internal/wcfs_watchlink.h
wcfs/internal/wcfs_watchlink.h
+1
-1
No files found.
wcfs/internal/wcfs_misc.cpp
View file @
f1e4f89e
...
...
@@ -37,8 +37,8 @@ using namespace golang;
// io::
namespace
io
{
const
error
EOF_
=
fmt
::
errorf
(
"EOF"
);
const
error
ErrUnexpectedEOF
=
fmt
::
errorf
(
"unexpected EOF"
);
const
error
EOF_
=
error
::
New
(
"EOF"
);
const
error
ErrUnexpectedEOF
=
error
::
New
(
"unexpected EOF"
);
}
// io::
...
...
@@ -182,19 +182,17 @@ string sprintf(const char *format, ...) {
}
error
errorf
(
const
string
&
format
,
...)
{
error
err
;
va_list
argp
;
va_start
(
argp
,
format
);
err
.
err
=
fmt
::
sprintf
(
format
.
c_str
(),
argp
);
err
or
err
=
error
::
New
(
fmt
::
sprintf
(
format
.
c_str
(),
argp
)
);
va_end
(
argp
);
return
err
;
}
error
errorf
(
const
char
*
format
,
...)
{
error
err
;
va_list
argp
;
va_start
(
argp
,
format
);
err
.
err
=
fmt
::
sprintf
(
format
,
argp
);
err
or
err
=
error
::
New
(
fmt
::
sprintf
(
format
,
argp
)
);
va_end
(
argp
);
return
err
;
}
...
...
@@ -233,8 +231,8 @@ vector<string> split(const string &s, char sep) {
// context::
namespace
context
{
const
error
canceled
=
fmt
::
errorf
(
"context canceled"
);
const
error
deadlineExceeded
=
fmt
::
errorf
(
"deadline exceeded"
);
const
error
canceled
=
error
::
New
(
"context canceled"
);
const
error
deadlineExceeded
=
error
::
New
(
"deadline exceeded"
);
struct
_Background
:
Context
{
chan
<
structZ
>
done
()
{
...
...
wcfs/internal/wcfs_misc.h
View file @
f1e4f89e
...
...
@@ -74,6 +74,9 @@ public:
bool
operator
!=
(
const
error
&
rhs
)
const
{
return
!
(
*
this
==
rhs
);
}
// New creats error with text
static
error
New
(
const
string
&
text
);
};
// io::
...
...
wcfs/internal/wcfs_watchlink.h
View file @
f1e4f89e
...
...
@@ -26,9 +26,9 @@
#include <golang/libgolang.h>
using
namespace
golang
;
#include "wcfs.h"
#include "wcfs_misc.h"
struct
WCFS
;
struct
PinReq
;
...
...
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