Arseny Kapoulkine
cf466ce2a2
Merge pull request #595 from zeux/stl-defarg
...
Use cleaner references to STL classes
2023-11-16 12:42:22 -08:00
Arseny Kapoulkine
499750ad95
Merge pull request #596 from zeux/appvmp
...
AppVeyor build optimizations
2023-11-16 12:32:28 -08:00
Arseny Kapoulkine
cd420ab193
Use make -j2 for mingw builds on AppVeyor
2023-11-16 12:12:56 -08:00
Arseny Kapoulkine
d99aa003ba
Restrict AppVeyor builds to master branch
...
This avoids duplicate builds on PRs submitted from a branch in the same
repository.
2023-11-16 12:09:18 -08:00
Arseny Kapoulkine
1e3d6f15f5
tests: Add /MP to AppVeyor builds to try to reduce build time
2023-11-16 11:27:40 -08:00
Arseny Kapoulkine
2e8a2a4e1c
tests: Work around -Wself-move in new gcc
...
We do want to test self-move; fortunately, hiding the object reference
behind a separate pointer variable silences the warning.
2023-11-16 10:54:53 -08:00
Arseny Kapoulkine
0bd2848f33
Use cleaner references to STL classes
...
The explicit specification of default template arguments is repetitive
and dates back to the versions of pugixml that tried to forward-declare
all STL classes manually, which ran into issues with default arguments
in some STL versions.
We've since abandoned this idea and use <string>/<iosfwd> includes, as
such it should be fine to rely on default arguments.
Note: while we could use std::wstring, this had compatibility issues
with some very early versions of Android SDK. Out of abundance of
caution, we keep basic_i/ostream and basic_string in tact. We could use
std::string but we might need to replace these in char8 mode if that
ever gets merged.
2023-11-16 10:51:20 -08:00
Arseny Kapoulkine
43d7d568a7
Merge pull request #594 from SoapGentoo/Wuseless-cast
...
Fix `-Wuseless-cast`
2023-11-14 07:13:09 -08:00
David Seifert
44236fef2c
Fix -Wuseless-cast
2023-11-13 20:53:44 -08:00
Arseny Kapoulkine
6909df2478
Merge pull request #590 from zeux/sanfuzz
...
Update config=sanitize and fuzz targets
2023-10-22 11:18:08 -07:00
Arseny Kapoulkine
b15bc6bf1f
Update config=sanitize and fuzz targets
...
We used to need to silence float-divide-by-zero and float-cast-overflow
sanitizers since clang used a finite valid floating point value range.
Fortunately, since clang-9 UBSAN properly handles various primitive
operations per IEEE-754 so we no longer need this workaround.
Also use fork=16 mode for fuzz targets to make it easier to run fuzzing
locally.
2023-10-22 10:07:52 -07:00
Arseny Kapoulkine
33f709379a
Merge pull request #551 from silvergasp/master
...
fuzzer: excersizes query code on xml doc
2023-10-21 12:29:22 -07:00
Arseny Kapoulkine
4d42ba7a60
Update fuzz_xpath.cpp
...
Remove unused variables
2023-10-21 11:20:03 -07:00
Arseny Kapoulkine
d75a081aa3
Update fuzz_xpath.cpp
...
Fix code style, no exceptions, other tweaks.
2023-10-21 11:11:11 -07:00
Arseny Kapoulkine
1ade1d4bea
Merge pull request #586 from PhilipBotha/fix/nullptr_const_zero
...
Replaced 0 with PUGIXML_NULL when a nullptr would have been needed.
2023-10-19 19:21:08 -07:00
Arseny Kapoulkine
94b19a3c45
Fix indentation changes
2023-10-15 19:25:56 -07:00
Arseny Kapoulkine
76dec417a6
Silence -Wzero-as-null-pointer-constant for clang
...
clang does not handle NULL the same way as gcc, so for now we silence
the warning.
2023-10-15 19:19:36 -07:00
Arseny Kapoulkine
6699559320
Replace 0 with NULL for some MSVC-specific code
2023-10-15 19:17:37 -07:00
Arseny Kapoulkine
dab3a2f858
Replace 0 with NULL for compact and wchar mode specific code
2023-10-15 19:13:34 -07:00
Arseny Kapoulkine
60d9656cb7
Replace PUGIXML_NULL with NULL and fix a couple extra stragglers
2023-10-15 19:10:34 -07:00
Philip
08b966e24f
Fixed zero as nullptr constant in macro.
...
Removed white space that was changed.
2023-10-14 09:06:20 +02:00
Arseny Kapoulkine
2e357d19a3
Merge pull request #585 from ilya-lavrenov/install-rules
...
Added cmake option to disable install rules
2023-10-13 20:14:59 -07:00
Philip Botha
b138778fd9
Replaced 0 with PUGIXML_NULL when appropriate.
...
Added the suffix UZ to size_t.
Added fixed GCC warning about using const literal zero in place of nullptr (-Wzero-as-null-pointer-constant).
2023-10-12 15:49:18 +02:00
Ilya Lavrenov
3cfe51b72d
Added cmake option to disable install rules
2023-10-12 02:15:05 +04:00
Arseny Kapoulkine
ef856bf975
Merge pull request #584 from richardapeters/master
...
build: only include CTest when building the pugixml tests
2023-10-06 06:14:27 -07:00
Richard Peters
efce4a8d7a
Remove BUILD_TESTING as prerequisite for the PUGIXML_BUILD_TESTS; it was always set by including CTest, now CTest is conditionally included later on
2023-10-06 10:02:15 +02:00
Richard Peters
a468d5c438
Only include CTest when building the pugixml tests
2023-10-06 09:51:29 +02:00
Arseny Kapoulkine
db78afc2b7
Update version to 1.14 everywhere
v1.14
latest
2023-09-07 11:55:13 -07:00
Arseny Kapoulkine
bd70bd7662
docs: Update release notes and regenerate HTML documentation
...
The large amount of changes seems to be due to asciidoctor now omitting
empty spans in formatted code.
2023-09-07 11:52:15 -07:00
Arseny Kapoulkine
1a9a41b0f4
Update copyright year (2022 => 2023)
2023-09-06 20:39:25 -07:00
Arseny Kapoulkine
1118066f0b
Merge pull request #576 from vineethkuttan/Merge-pcdata-#546
...
Implement parse_merge_pcdata
2023-09-06 08:01:56 -07:00
Arseny Kapoulkine
ff56985924
Rename merged to merged_pcdata for clarity.
2023-09-06 07:54:14 -07:00
Arseny Kapoulkine
30adb1713b
Use memmove instead of strcat
...
strcat does not allow overlapping ranges; we didn't have a test for this
but now we do.
As an added bonus, this also means we only compute the length of each
fragment once now.
2023-09-05 22:43:55 -07:00
Arseny Kapoulkine
58616a29aa
Avoid store-load penalty on cursor->parent
...
This reclaims the performance lost in PCDATA reorganization and gains a
little more on top of that.
2023-09-05 22:23:31 -07:00
Arseny Kapoulkine
dfb2b7f7b4
Cache ~last position of merged PCDATA
...
This allows us to fix the quadratic complexity of parse_merge_pcdata.
After parsing the first PCDATA we need to advance by its length; we
still compute the length of each fragment twice with this approach, but
it's constant time.
2023-09-05 21:34:02 -07:00
Arseny Kapoulkine
efb76c1128
docs: Update external XPath links
...
Both w3schools tutorial and the W3C spec have changed their URLs; I
don't think we actually need the second tutorial so we can simply drop
that one.
2023-08-28 21:26:09 -07:00
Arseny Kapoulkine
bf42c4c568
Reorder set_value/set size_t overloads and change sz to size
...
This makes the source order and naming match documentation.
2023-08-26 08:41:37 -07:00
Arseny Kapoulkine
5a33d2b1d7
docs: Add forgotten set_name overloads to API reference
2023-08-26 08:38:42 -07:00
Arseny Kapoulkine
e9d17a045e
Streamline conditions with else if
2023-08-26 08:35:40 -07:00
Arseny Kapoulkine
08a5048f15
Merge pull request #537 from stefanroellin/size-t-overloads
...
Add overloads with size_t type argument
2023-08-26 08:27:34 -07:00
Stefan Roellin
f4d4316eba
Add overloads with size_t type argument
...
* bool xml_attribute::set_name(const char_t* rhs, size_t sz)
* bool xml_node::set_name(const char_t* rhs, size_t sz)
2023-08-26 11:30:49 +02:00
Arseny Kapoulkine
6749789ec4
Fix interaction between parse_merge_pcdata and append_buffer
...
strconcat in the parsing loop only works if we know the source string
comes from the same buffer that we're parsing. This is somewhat
cumbersome to establish during parsing and it requires extra tracking
data, so we just disable this combination as it's unlikely to be
actually useful - usually append_buffer would be called on a possibly
empty collection of elements, not on something with PCDATA.
2023-08-25 19:32:42 -07:00
Arseny Kapoulkine
f31ad2c1ab
tests: Add more tests for parse_merge_pcdata
...
Add tests for double escape and a test for interaction with
parse_ws_pcdata flags; this behavior might change but we should pin the
current result.
Also slightly clean up the previously added test.
2023-08-25 19:20:23 -07:00
Arseny Kapoulkine
37ba937e05
Fix code style and simplify conditions
...
prev_sibling_c is never NULL so it should be safe to check first_child
instead, which ensures we may the minumum cost when the feature isn't
enabled.
2023-08-25 18:57:06 -07:00
Arseny Kapoulkine
0189471a3a
docs: Fix up grammar
2023-08-25 18:48:32 -07:00
Arseny Kapoulkine
c72a210ff7
tests: Add more tests for empty text setup
...
Here we also test what happens when text gets assigned to an empty
string after initially being non-empty, to make sure this is not
different from the initial state.
2023-08-25 18:15:36 -07:00
Vineeth
3ad133a2ad
Review Changes
...
i)Indentation added
ii)Optimal parsing ensured
2023-08-23 08:12:57 +05:30
vineeth-11316
a28252205a
Final Commit
2023-08-20 10:21:26 +05:30
vineeth-11316
068aa22b1a
documentation Change
2023-08-19 09:54:01 +05:30
vineeth-11316
e15adbe704
Intial Commit for merge_pcdata
2023-08-19 09:17:54 +05:30