Skip to content

Commit dd50fa5

Browse files
committed
Fix PUGIXML_VERSION macro
Also make sure the line shows up in grep when using the current version number. Fixes #478.
1 parent 314baf6 commit dd50fa5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: src/pugixml.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
* Copyright (C) 2003, by Kristen Wegner ([email protected])
1212
*/
1313

14-
#ifndef PUGIXML_VERSION
1514
// Define version macro; evaluates to major * 1000 + minor * 10 + patch so that it's safe to use in less-than comparisons
1615
// 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
17-
# define PUGIXML_VERSION 1110
16+
#ifndef PUGIXML_VERSION
17+
# define PUGIXML_VERSION 1120 // 1.12
1818
#endif
1919

2020
// Include user configuration file (this can define various configuration macros)

Diff for: tests/test_version.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "../src/pugixml.hpp"
22

3-
#if PUGIXML_VERSION != 1110
3+
#if PUGIXML_VERSION != 1120
44
#error Unexpected pugixml version
55
#endif

0 commit comments

Comments
 (0)