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
f7b54ca4
Commit
f7b54ca4
authored
Feb 11, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X avoid fmt::vsprintf (now compils again with latest pygolang@master)
parent
d994f5f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
wcfs/client/wcfs_misc.cpp
wcfs/client/wcfs_misc.cpp
+3
-0
wcfs/client/wcfs_misc.h
wcfs/client/wcfs_misc.h
+9
-2
No files found.
wcfs/client/wcfs_misc.cpp
View file @
f7b54ca4
...
...
@@ -224,6 +224,8 @@ tuple<uint64_t, error> parseUint(const string& s) {
// xerr::
namespace
xerr
{
// XXX don't require fmt::vsprintf
#if 0
Contextf::Contextf(const char *format, ...) {
Contextf& c = *this;
...
...
@@ -232,6 +234,7 @@ Contextf::Contextf(const char *format, ...) {
c.errctx = fmt::vsprintf(format, argp);
va_end(argp);
}
#endif
error
Contextf
::
operator
()
(
error
err
)
const
{
const
Contextf
&
c
=
*
this
;
...
...
wcfs/client/wcfs_misc.h
View file @
f7b54ca4
...
...
@@ -146,6 +146,8 @@ typedef uint64_t Oid;
}
// zodb::
#include <golang/fmt.h>
// xerr::
namespace
xerr
{
...
...
@@ -164,11 +166,16 @@ class Contextf {
string
errctx
;
public:
Contextf
(
const
char
*
format
,
...);
template
<
typename
...
Argv
>
inline
Contextf
(
const
char
*
format
,
Argv
...
argv
)
{
// XXX string() to avoid "error: format not a string literal" given by -Werror=format-security
errctx
=
fmt
::
sprintf
(
string
(
format
),
argv
...);
}
error
operator
()
(
error
)
const
;
};
}
}
// xerr::
// wcfs::
...
...
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