From dd50fa5b45ab8d58d6c27566c2eaf04a8b7e5841 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Thu, 10 Feb 2022 08:36:19 -0800 Subject: [PATCH] Fix PUGIXML_VERSION macro Also make sure the line shows up in grep when using the current version number. Fixes #478. --- src/pugixml.hpp | 4 ++-- tests/test_version.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pugixml.hpp b/src/pugixml.hpp index 5a8496d..579f143 100644 --- a/src/pugixml.hpp +++ b/src/pugixml.hpp @@ -11,10 +11,10 @@ * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net) */ -#ifndef PUGIXML_VERSION // Define version macro; evaluates to major * 1000 + minor * 10 + patch so that it's safe to use in less-than comparisons // Note: pugixml used major * 100 + minor * 10 + patch format up until 1.9 (which had version identifier 190); starting from pugixml 1.10, the minor version number is two digits -# define PUGIXML_VERSION 1110 +#ifndef PUGIXML_VERSION +# define PUGIXML_VERSION 1120 // 1.12 #endif // Include user configuration file (this can define various configuration macros) diff --git a/tests/test_version.cpp b/tests/test_version.cpp index 11f8a7f..a19b59b 100644 --- a/tests/test_version.cpp +++ b/tests/test_version.cpp @@ -1,5 +1,5 @@ #include "../src/pugixml.hpp" -#if PUGIXML_VERSION != 1110 +#if PUGIXML_VERSION != 1120 #error Unexpected pugixml version #endif