Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
70e1eb3f
Commit
70e1eb3f
authored
Oct 18, 2011
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the #ifdefs for the api stuff
parent
77cc5458
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
CMakeLists.txt
+0
-2
include/yaml-cpp/yaml.h.cmake
+1
-0
src/null.cpp
+2
-2
src/parser.cpp
+2
-2
util/parse.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
70e1eb3f
...
...
@@ -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 @
70e1eb3f
...
...
@@ -5,6 +5,7 @@
#pragma once
#endif
#undef YAML_CPP_OLD_API
@API_DEFINE@
#include "yaml-cpp/parser.h"
...
...
src/null.cpp
View file @
70e1eb3f
#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 @
70e1eb3f
...
...
@@ -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 @
70e1eb3f
...
...
@@ -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