Skip to content

Commit

Permalink
Fix PUGIXML_VERSION macro
Browse files Browse the repository at this point in the history
Also make sure the line shows up in grep when using the current version
number.

Fixes #478.
  • Loading branch information
zeux committed Feb 10, 2022
1 parent 314baf6 commit dd50fa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pugixml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
* Copyright (C) 2003, by Kristen Wegner ([email protected])
*/

#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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "../src/pugixml.hpp"

#if PUGIXML_VERSION != 1110
#if PUGIXML_VERSION != 1120
#error Unexpected pugixml version
#endif

0 comments on commit dd50fa5

Please sign in to comment.