C++: Rename jansson-impl.hpp to jansson.ipp
The .ipp suffix is for inlined template implementation code. While at it, use #ifdef and #ifndef instead of #if defined().
This commit is contained in:
parent
b07e69c37a
commit
d1a0c3ffc2
@ -1,4 +1,4 @@
|
|||||||
include_HEADERS = jansson.h jansson.hpp jansson-impl.hpp
|
include_HEADERS = jansson.h jansson.hpp jansson.ipp
|
||||||
|
|
||||||
lib_LTLIBRARIES = libjansson.la
|
lib_LTLIBRARIES = libjansson.la
|
||||||
libjansson_la_SOURCES = \
|
libjansson_la_SOURCES = \
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
// Jansson is free software; you can redistribute it and/or modify
|
// Jansson is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the MIT license. See LICENSE for details.
|
// it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
|
||||||
#if !defined(JANSSON_HPP)
|
#ifndef JANSSON_HPP
|
||||||
#define JANSSON_HPP 1
|
#define JANSSON_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
@ -296,8 +296,8 @@ inline std::ostream& operator<<(std::ostream& os, const json::Value& value);
|
|||||||
inline std::istream& operator>>(std::istream& is, json::Value& value);
|
inline std::istream& operator>>(std::istream& is, json::Value& value);
|
||||||
|
|
||||||
// include implementation code
|
// include implementation code
|
||||||
#define IN_JANSSON_HPP 1
|
#define IN_JANSSON_HPP
|
||||||
#include "jansson-impl.hpp"
|
#include "jansson.ipp"
|
||||||
#undef IN_JANSSON_HPP
|
#undef IN_JANSSON_HPP
|
||||||
|
|
||||||
#endif // defined(JANSSON_HPP)
|
#endif // defined(JANSSON_HPP)
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
// Jansson is free software; you can redistribute it and/or modify
|
// Jansson is free software; you can redistribute it and/or modify
|
||||||
// it under the terms of the MIT license. See LICENSE for details.
|
// it under the terms of the MIT license. See LICENSE for details.
|
||||||
|
|
||||||
#if !defined(IN_JANSSON_HPP)
|
#ifndef IN_JANSSON_HPP
|
||||||
#error "jansson-impl.hpp may only by included from jansson.hpp"
|
#error "jansson.ipp may only be included from jansson.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace json {
|
namespace json {
|
Loading…
Reference in New Issue
Block a user