diff options
author | Petri Lehtinen <petri@digip.org> | 2010-02-02 21:10:57 +0200 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2010-02-02 21:10:58 +0200 |
commit | d1a0c3ffc2c7d383c801e679c7aa0719a2f25794 (patch) | |
tree | 37eeb91cf4f636da6b0f6867c8da2b2fbaa1a18d /src | |
parent | b07e69c37aa7cc1dd27aff9f3ba5cef703f2e357 (diff) | |
download | jansson-d1a0c3ffc2c7d383c801e679c7aa0719a2f25794.zip jansson-d1a0c3ffc2c7d383c801e679c7aa0719a2f25794.tar.gz jansson-d1a0c3ffc2c7d383c801e679c7aa0719a2f25794.tar.bz2 |
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().
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/jansson.hpp | 8 | ||||
-rw-r--r-- | src/jansson.ipp (renamed from src/jansson-impl.hpp) | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 460b26a..92fc90c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 libjansson_la_SOURCES = \ diff --git a/src/jansson.hpp b/src/jansson.hpp index 41afd67..265b2b9 100644 --- a/src/jansson.hpp +++ b/src/jansson.hpp @@ -3,8 +3,8 @@ // Jansson is free software; you can redistribute it and/or modify // it under the terms of the MIT license. See LICENSE for details. -#if !defined(JANSSON_HPP) -#define JANSSON_HPP 1 +#ifndef JANSSON_HPP +#define JANSSON_HPP #include <string> #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); // include implementation code -#define IN_JANSSON_HPP 1 -#include "jansson-impl.hpp" +#define IN_JANSSON_HPP +#include "jansson.ipp" #undef IN_JANSSON_HPP #endif // defined(JANSSON_HPP) diff --git a/src/jansson-impl.hpp b/src/jansson.ipp index eb68fcd..a845e84 100644 --- a/src/jansson-impl.hpp +++ b/src/jansson.ipp @@ -3,8 +3,8 @@ // Jansson is free software; you can redistribute it and/or modify // it under the terms of the MIT license. See LICENSE for details. -#if !defined(IN_JANSSON_HPP) -#error "jansson-impl.hpp may only by included from jansson.hpp" +#ifndef IN_JANSSON_HPP +#error "jansson.ipp may only be included from jansson.hpp" #endif namespace json { |