Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Multiple updates for building on Ubuntu 10.04 LTS

  • Loading branch information...
commit e491604bddcc5ae37b7ab1d7ec309018cacf0ef4 1 parent 321ab6f
@robklpd robklpd authored
Showing with 8 additions and 3 deletions.
  1. +5 −2 CMakeLists.txt
  2. +1 −1  gobj/GobjectImplScalar.cpp
  3. +2 −0  json-me.hpp
View
7 CMakeLists.txt
@@ -5,9 +5,12 @@ set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
-ADD_DEFINITIONS( -Wall -Werror -Weffc++ -Wctor-dtor-privacy -Wuninitialized -Winit-self -Wmissing-include-dirs -Wfloat-equal -Wshadow -Wpointer-arith -Wunreachable-code )
+ADD_DEFINITIONS( -Wall -Werror -Weffc++ -Wctor-dtor-privacy -Wuninitialized -Winit-self -Wmissing-include-dirs -Wfloat-equal -Wshadow -Wpointer-arith )
ADD_DEFINITIONS(-DUSE_GOBJECT_JSON_LIB)
-ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/ -I/usr/include/glib-2.0/ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/)
+#Uncomment the following line for ubuntu 11.10, FIXME: use cmake properly to figure this out.
+#ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/ -I/usr/include/glib-2.0/ -I/usr/lib/x86_64-linux-gnu/glib-2.0/include/)
+#Uncomment the following line for ubuntu 10.04 LTS.
+ADD_DEFINITIONS( -I/usr/include/json-glib-1.0/ -I/usr/include/glib-2.0/ -I/usr/lib/glib-2.0/include )
add_library(jsonme SHARED JsonMeLib.cpp Scalar.cpp Node.cpp ParseError.cpp gobj/GobjectLibImpl.cpp gobj/GobjectImplParser.cpp gobj/GobjectImplFsTopNode.cpp gobj/GobjectImplStringTopNode.cpp gobj/GobjectImplError.cpp gobj/GobjectImplNode.cpp gobj/GobjectImplScalar.cpp gobj/GobjectImplKeys.cpp)
SET_TARGET_PROPERTIES(jsonme PROPERTIES VERSION 1.0.0 SOVERSION 1)
target_link_libraries(jsonme gobject-2.0 json-glib-1.0)
View
2  gobj/GobjectImplScalar.cpp
@@ -20,7 +20,7 @@ namespace jsonme {
namespace impl {
//Constructor.
GobjectImplScalar::GobjectImplScalar(JsonNode * const node):mNode(node),mValue(){
- if (mNode && JSON_NODE_HOLDS_VALUE(mNode)) {
+ if (mNode && ((json_node_get_node_type(((mNode))) == (JSON_NODE_VALUE)))) {
json_node_get_value(mNode,&mValue); //Fetch the value if possible.
}
}
View
2  json-me.hpp
@@ -53,6 +53,7 @@ namespace jsonme {
boost::shared_ptr<AbstractScalar> mScalar;
public:
Scalar();
+ ~Scalar() throw() {}
Scalar(AbstractScalar *scalar);
jsonme::scalartype scalartype() const;
operator long double() const;
@@ -91,6 +92,7 @@ namespace jsonme {
public:
Node();
Node(AbstractNode *node);
+ ~Node() throw() {}
AbstractKeys & keys();
jsonme::nodetype nodetype() const;
Node operator[](std::string const & name) const;
Please sign in to comment.
Something went wrong with that request. Please try again.