Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
488c3d6c
Commit
488c3d6c
authored
Oct 18, 2011
by
beder
Browse files
Fixed the #ifdefs for the api stuff
parent
075f8449
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
CMakeLists.txt
CMakeLists.txt
+0
-2
include/yaml-cpp/yaml.h.cmake
include/yaml-cpp/yaml.h.cmake
+1
-0
src/null.cpp
src/null.cpp
+2
-2
src/parser.cpp
src/parser.cpp
+2
-2
util/parse.cpp
util/parse.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
488c3d6c
...
...
@@ -57,8 +57,6 @@ option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs (
###
if
(
YAML_CPP_BUILD_OLD_API
)
set
(
API_DEFINE
"#define YAML_CPP_OLD_API"
)
else
()
set
(
API_DEFINE
"#undef YAML_CPP_OLD_API"
)
endif
()
configure_file
(
${
YAML_CPP_SOURCE_DIR
}
/include/yaml-cpp/yaml.h.cmake
${
YAML_CPP_SOURCE_DIR
}
/include/yaml-cpp/yaml.h @ONLY
)
...
...
include/yaml-cpp/yaml.h.cmake
View file @
488c3d6c
...
...
@@ -5,6 +5,7 @@
#pragma once
#endif
#undef YAML_CPP_OLD_API
@API_DEFINE@
#include "yaml-cpp/parser.h"
...
...
src/null.cpp
View file @
488c3d6c
#include "yaml-cpp/null.h"
#if YAML_CPP_OLD_API
#if
def
YAML_CPP_OLD_API
#include "yaml-cpp/old-api/node.h"
#endif
...
...
@@ -8,7 +8,7 @@ namespace YAML
{
_Null
Null
;
#if YAML_CPP_OLD_API
#if
def
YAML_CPP_OLD_API
bool
IsNull
(
const
Node
&
node
)
{
return
node
.
Read
(
Null
);
...
...
src/parser.cpp
View file @
488c3d6c
...
...
@@ -9,7 +9,7 @@
#include <sstream>
#include <cstdio>
#if YAML_CPP_OLD_API
#if
def
YAML_CPP_OLD_API
#include "yaml-cpp/old-api/node.h"
#include "old-api/nodebuilder.h"
#endif
...
...
@@ -58,7 +58,7 @@ namespace YAML
return
true
;
}
#if YAML_CPP_OLD_API
#if
def
YAML_CPP_OLD_API
// GetNextDocument
// . Reads the next document in the queue (of tokens).
// . Throws a ParserException on error.
...
...
util/parse.cpp
View file @
488c3d6c
...
...
@@ -37,7 +37,7 @@ public:
void
parse
(
std
::
istream
&
input
)
{
try
{
#if YAML_CPP_OLD_API
#if
def
YAML_CPP_OLD_API
YAML
::
Parser
parser
(
input
);
YAML
::
Node
doc
;
while
(
parser
.
GetNextDocument
(
doc
))
{
...
...
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