Skip to content

Commit a0e0643

Browse files
authored
Merge pull request #526 from zeux/newver
Prepare for 1.13 release
2 parents 43ef7e2 + 3bd1f45 commit a0e0643

File tree

12 files changed

+225
-134
lines changed

12 files changed

+225
-134
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.4)
2-
project(pugixml VERSION 1.12 LANGUAGES CXX)
2+
project(pugixml VERSION 1.13 LANGUAGES CXX)
33

44
include(CMakePackageConfigHelpers)
55
include(CMakeDependentOption)

docs/manual.adoc

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,7 @@ As discussed before, nodes can have name and value, both of which are strings. D
12541254
----
12551255
bool xml_node::set_name(const char_t* rhs);
12561256
bool xml_node::set_value(const char_t* rhs);
1257+
bool xml_node::set_value(const char_t* rhs, size_t size);
12571258
----
12581259

12591260
Both functions try to set the name/value to the specified string, and return the operation result. The operation fails if the node can not have name or value (for instance, when trying to call `set_name` on a <<node_pcdata,node_pcdata>> node), if the node handle is null, or if there is insufficient memory to handle the request. The provided string is copied into document managed memory and can be destroyed after the function returns (for example, you can safely pass stack-allocated buffers to these functions). The name/value content is not verified, so take care to use only valid XML names, or the document may become malformed.
@@ -1275,6 +1276,7 @@ All attributes have name and value, both of which are strings (value may be empt
12751276
----
12761277
bool xml_attribute::set_name(const char_t* rhs);
12771278
bool xml_attribute::set_value(const char_t* rhs);
1279+
bool xml_attribute::set_value(const char_t* rhs, size_t size);
12781280
----
12791281

12801282
Both functions try to set the name/value to the specified string, and return the operation result. The operation fails if the attribute handle is null, or if there is insufficient memory to handle the request. The provided string is copied into document managed memory and can be destroyed after the function returns (for example, you can safely pass stack-allocated buffers to these functions). The name/value content is not verified, so take care to use only valid XML names, or the document may become malformed.
@@ -1428,6 +1430,7 @@ Once you have an `xml_text` object, you can set the text contents using the foll
14281430
[source]
14291431
----
14301432
bool xml_text::set(const char_t* rhs);
1433+
bool xml_text::set(const char_t* rhs, size_t size);
14311434
----
14321435

14331436
This function tries to set the contents to the specified string, and returns the operation result. The operation fails if the text object was retrieved from a node that can not have a value and is not an element node (i.e. it is a <<node_declaration,node_declaration>> node), if the text object is empty, or if there is insufficient memory to handle the request. The provided string is copied into document managed memory and can be destroyed after the function returns (for example, you can safely pass stack-allocated buffers to this function). Note that if the text object was retrieved from an element node, this function creates the PCDATA child node if necessary (i.e. if the element node does not have a PCDATA/CDATA child already).
@@ -2138,6 +2141,23 @@ Because of the differences in document object models, performance considerations
21382141

21392142
:!numbered:
21402143

2144+
[[v1.13]]
2145+
=== v1.13 ^2022-11-01^
2146+
2147+
Maintenance release. Changes:
2148+
2149+
* Improvements:
2150+
. `xml_attribute::set_value`, `xml_node::set_value` and `xml_text::set` now have overloads that accept pointer to non-null-terminated string and size
2151+
. Improve performance of tree traversal when using compact mode (`PUGIXML_COMPACT`)
2152+
2153+
* Bug fixes:
2154+
. Fix error handling in `xml_document::save_file` that could result in the function succeeding while running out of disk space
2155+
. Fix memory leak during error handling of some out-of-memory conditions during `xml_document::load`
2156+
2157+
* Compatibility improvements:
2158+
. Fix exported symbols in CMake DLL builds when using CMake
2159+
. Fix exported symbols in CMake shared object builds when using -fvisibility=hidden
2160+
21412161
[[v1.12]]
21422162
=== v1.12 ^2022-02-09^
21432163

@@ -2798,6 +2818,7 @@ const unsigned int +++<a href="#parse_wnorm_attribute">parse_wnorm_attribute</a>
27982818
27992819
bool +++<a href="#xml_attribute::set_name">set_name</a>+++(const char_t* rhs);
28002820
bool +++<a href="#xml_attribute::set_value">set_value</a>+++(const char_t* rhs);
2821+
bool +++<a href="#xml_attribute::set_value">set_value</a>+++(const char_t* rhs, size_t size);
28012822
bool +++<a href="#xml_attribute::set_value">set_value</a>+++(int rhs);
28022823
bool +++<a href="#xml_attribute::set_value">set_value</a>+++(unsigned int rhs);
28032824
bool +++<a href="#xml_attribute::set_value">set_value</a>+++(long rhs);
@@ -2884,6 +2905,7 @@ const unsigned int +++<a href="#parse_wnorm_attribute">parse_wnorm_attribute</a>
28842905
28852906
bool +++<a href="#xml_node::set_name">set_name</a>+++(const char_t* rhs);
28862907
bool +++<a href="#xml_node::set_value">set_value</a>+++(const char_t* rhs);
2908+
bool +++<a href="#xml_node::set_value">set_value</a>+++(const char_t* rhs, size_t size);
28872909
28882910
xml_attribute +++<a href="#xml_node::append_attribute">append_attribute</a>+++(const char_t* name);
28892911
xml_attribute +++<a href="#xml_node::prepend_attribute">prepend_attribute</a>+++(const char_t* name);
@@ -2996,16 +3018,17 @@ const unsigned int +++<a href="#parse_wnorm_attribute">parse_wnorm_attribute</a>
29963018
unsigned long long +++<a href="#xml_text::as_ullong">as_ullong</a>+++(unsigned long long def = 0) const;
29973019
29983020
bool +++<a href="#xml_text::set">set</a>+++(const char_t* rhs);
2999-
3000-
bool +++<a href="#xml_text::set">set</a>+++(int rhs);
3001-
bool +++<a href="#xml_text::set">set</a>+++(unsigned int rhs);
3002-
bool +++<a href="#xml_text::set">set</a>+++(long rhs);
3003-
bool +++<a href="#xml_text::set">set</a>+++(unsigned long rhs);
3004-
bool +++<a href="#xml_text::set">set</a>+++(double rhs);
3005-
bool +++<a href="#xml_text::set">set</a>+++(float rhs);
3006-
bool +++<a href="#xml_text::set">set</a>+++(bool rhs);
3007-
bool +++<a href="#xml_text::set">set</a>+++(long long rhs);
3008-
bool +++<a href="#xml_text::set">set</a>+++(unsigned long long rhs);
3021+
bool +++<a href="#xml_text::set">set</a>+++(const char_t* rhs, size_t size);
3022+
3023+
bool +++<a href="#xml_text::set_value">set</a>+++(int rhs);
3024+
bool +++<a href="#xml_text::set_value">set</a>+++(unsigned int rhs);
3025+
bool +++<a href="#xml_text::set_value">set</a>+++(long rhs);
3026+
bool +++<a href="#xml_text::set_value">set</a>+++(unsigned long rhs);
3027+
bool +++<a href="#xml_text::set_value">set</a>+++(double rhs);
3028+
bool +++<a href="#xml_text::set_value">set</a>+++(float rhs);
3029+
bool +++<a href="#xml_text::set_value">set</a>+++(bool rhs);
3030+
bool +++<a href="#xml_text::set_value">set</a>+++(long long rhs);
3031+
bool +++<a href="#xml_text::set_value">set</a>+++(unsigned long long rhs);
30093032
30103033
xml_text& +++<a href="#xml_text::assign">operator=</a>+++(const char_t* rhs);
30113034
xml_text& +++<a href="#xml_text::assign">operator=</a>+++(int rhs);

0 commit comments

Comments
 (0)