Age | Commit message (Collapse) | Author |
|
W3C specification does not allow predicates after abbreviated steps.
Currently this results in parsing terminating at the step, which leads
to confusing error messages like "Invalid query" or "Unmatched braces".
|
|
Any time an allocation fails xpath_allocator can set an externally
provided bool. The plan is to keep this bool up until evaluation ends,
so that we can use it to discard the potentially malformed result.
|
|
|
|
For both allocate and reallocate, provide both _nothrow and _throw
functions; this change renames allocate() to allocate_throw() (same for
reallocate) to make it easier to change the code to remove throwing
variants.
|
|
|
|
Handle node type error before creating expression node
|
|
|
|
We currently need to convert error based on the text to a different type
of C++ exceptions when C++ exceptions are enabled.
|
|
This allows us to handle OOM during node allocation without triggering
undefined behavior that occurs when placement new gets a NULL pointer.
|
|
Instead, return 0 and rely on parsing logic to propagate that all the
way down, and convert result to exception to maintain existing
interface.
|
|
Propagate the failure to the caller manually. This is a first step to
parser structure that does not depend on exceptions or longjmp for error
handling (and thus matches the XML parser). To preserve semantics we'll
have to convert error code to exception later.
|
|
Simplify function argument parsing by folding arg 0 parsing into the
main loop, reuse expression parsing logic for unary expression
|
|
It was only used in three places and didn't really make the code more
readable.
|
|
NULL return value will be reserved for the OOM error indicator.
|
|
|
|
Fixes #126
|
|
It's still not clear as to what exactly makes it emit this error when compiling
string_to_integer:
CC-3059 crayc++: INTERNAL __C_FILE_SCOPE_DATA__, File = <pugixml>/src/pugixml.cpp, Line = 4524, Column = 4
Expected no overflow in routine.
But a viable workaround for now is to exploit the knowledge that it uses
two-complement arithmetics and invert the sign manually.
Fixes #125.
|
|
We used to use the current timestamp when building the archive; switch to using
the timestamp of the tag with the version we're packaging.
This requires some monkey patching since tarfile module is always using current
timestamp when writing gzip header...
Also exclude archive.py from archive and simplify release file list in Makefile.
|
|
|
|
By default they are set to Jan 1 1970 which breaks homebrew.
Fixes #124.
|
|
|
|
The variable is being assigned to but never read when exceptions are
disabled.
|
|
These warnings are emitted on some GCC versions when targeting ARM; the
alignment is guaranteed to be correct due to how page offsets are set up
but the compiler doesn't know.
|
|
It's too dangerous to overload here - easy to accidentally mix floating point
path with boolean one.
|
|
Unfortunately, some compilers don't suppress these kinds of warnings in
template instantiations; solve this by moving the responsibility for computing
negative bool to the caller.
Also since we're doing that we don't really need to convert to unsigned in the
implementation - might as well have the caller do it, which removes some type
dispatch logic and slightly reduces binary size.
|
|
Put debugging information into the object file so that it can be shipped
with NuGet binaries. Based on the linker settings for the executable
debug info will either be put into the final .PDB or stripped out.
Fixes #110.
|
|
|
|
Previously the error offset pointed to the first mismatching character, which
can be confusing especially if the start tag name is a prefix of the end tag
name. Instead, move the offset to the first character of the name - that way
it should be more obvious that the problem is that the entire name mismatches.
Fixes #112.
|
|
Perl version needed Archive::Zip that for some reason is not installed on WSL by
default. Use this as an opportunity to remove the last Perl script.
|
|
|
|
This test tests two important invariants:
- Every combination of write flags has to result in a valid document
- Parsing that document and saving the result has to result in identical output
We don't test all flags since parse_no_escapes can intentionally result in
malformed documents and other flags aren't relevant for node output.
Also note that we test both no-whitespace and whitespace version to make sure
we don't have unnecessary whitespace added during formatting.
|
|
Also add it to the changelog for 1.8
|
|
|
|
Setting this flag outputs start and end tag for every element, including empty
elements.
Fixes #118.
|
|
|
|
|
|
Split some lines into two and add braces in some places to make the code more
readable.
|
|
This keeps all code that creates document/allocator/page structures together.
|
|
The separate copy of allocator state in parser was meant to increase parsing
performance by reducing aliasing/indirection, but benchmarks against the
current source don't indicate that this is worthwhile.
Removing this simplifies the code slightly and makes it possible to move
compact hash table to the allocator.
|
|
|
|
Some compilers support move semantics but don't support ranged for.
|
|
MSVC 2010 supported move semantics (partially - but should be good enough for
our use case).
|
|
Do it in one place and set PUGIXML_HAS_MOVE if it's available.
|
|
VS 2013 supports C++11, but __cplusplus macro isn't updated, and it is 199711 so the old check always fails, even though the compiler supports c++11.
|
|
Add C++11 'override' specifier
|
|
|
|
|
|
|
|
docs: Fix broken link at quickstart page
|
|
|