#
c461b600 |
| 24-May-2024 |
Levi Morrison |
refactor: change `zend_is_true` to return `bool` (#14301) Previously this returned `int`. Many functions actually take advantage of the fact this returns exactly 0 or 1. For instance,
refactor: change `zend_is_true` to return `bool` (#14301) Previously this returned `int`. Many functions actually take advantage of the fact this returns exactly 0 or 1. For instance, `main/streams/xp_socket.c` does: sockopts |= STREAM_SOCKOP_IPV6_V6ONLY_ENABLED * zend_is_true(tmpzval); And `Zend/zend_compile.c` does: child = &ast->child[2 - zend_is_true(zend_ast_get_zval(ast->child[0]))]; I changed a few places trivially from `int` to `bool`, but there are still many places such as the object handlers which return `int` that should eventually be `bool`.
show more ...
|
#
e95b06c5 |
| 12-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Make some more arguments const
|
#
1fdbb0ab |
| 12-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Get rid of unused declarations
|
#
44485892 |
| 10-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Factor out all common code for XML serialization and merge common paths
|
#
6e7adb3c |
| 09-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Update ext/dom names after policy change (#14171)
|
#
fae25ca2 |
| 04-May-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Move dom_attr_value() into ext/libxml
|
#
e878b9f3 |
| 30-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix crashes when entity declaration is removed while still having entity references libxml doesn't do reference counting inside its node types. It's possible to remove an entity declarat
Fix crashes when entity declaration is removed while still having entity references libxml doesn't do reference counting inside its node types. It's possible to remove an entity declaration out of the document, but then entity references will keep pointing to that stale declaration. This will cause crashes. One idea would be to check when a declaration is removed, to trigger a hook that updates all references. However this means we have to keep track of all references somehow, which would be a high-overhead solution. The solution in this patch makes sure that the fields are always updated before they are read. Closes GH-14089.
show more ...
|
#
47feb579 |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Support named items in dimension handling for HTMLCollection Closes GH-13937.
|
#
b3f820b4 |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Split off nodelist header components to nodelist.h
|
#
53f6e5ec |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Move node list dimension handling to a separate file
|
#
5c69b2e8 |
| 10-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Factor out reading an attribute value
|
#
a0da32a4 |
| 07-Apr-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Cleanup and optimize attribute value reading (#13897) When the attribute has a single text child, we can avoid an allocating call to libxml2 and read the contents directly. On m
Cleanup and optimize attribute value reading (#13897) When the attribute has a single text child, we can avoid an allocating call to libxml2 and read the contents directly. On my i7-4790, I tested the optimization with both the $value and $nodeValue property. ``` Summary ./sapi/cli/php bench_value.php ran 1.82 ± 0.09 times faster than ./sapi/cli/php_old bench_value.php Summary ./sapi/cli/php bench_nodeValue.php ran 1.78 ± 0.10 times faster than ./sapi/cli/php_old bench_nodeValue.php ``` Test code: ``` $dom = new DOMDocument; $dom->loadXML('<root attrib="this is a relatively short text"/>'); $attrib = $dom->documentElement->attributes[0]; for ($i=0; $i<1000*1000; $i++) { $attrib->value; // or nodeValue } ```
show more ...
|
#
649394d3 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove redundant namespace define
|
#
d57e7a92 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use BAD_CAST consistently
|
#
751163d1 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Change stricterror type to bool
|
#
63bb04e5 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Simplify DOM_RET_OBJ macro
|
#
1cb86b6f |
| 08-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Cleanup php_dom_create_object()
|
#
14b6c981 |
| 09-Mar-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] Add a way to opt-in ext/dom spec compliance (#13031) RFC: https://wiki.php.net/rfc/opt_in_dom_spec_compliance
|
#
b8a1041f |
| 25-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix reference access in dimensions for DOMNodeList and DOMNodeMap Closes GH-13511.
|
#
85217a04 |
| 22-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Mark DOMXPath as uncloneable This never resulted in a working XPath object anyway, as trying to query or evaluate anything resulted in an "Invalid XPath context" error. Supporting th
Mark DOMXPath as uncloneable This never resulted in a working XPath object anyway, as trying to query or evaluate anything resulted in an "Invalid XPath context" error. Supporting this is more trouble than it's worth, so just block the clone operation.
show more ...
|
#
9fc7be8c |
| 10-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use bools
|
#
79e31c23 |
| 10-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Don't use heap allocations for registering DOM property handlers
|
#
f537ed9d |
| 09-Feb-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Cleanup useless stuff in php_dom.c
|
#
90785dd8 |
| 12-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
[RFC] Improve callbacks in ext/dom and ext/xsl (#12627)
|
#
2b30f187 |
| 12-Jan-2024 |
Tim Düsterhus |
Remove unused includes of php_random.h (#13131) Before this change php_random.h was listed in 146 different *.dep files for a env CC=clang ./configure --without-sqlite3 --withou
Remove unused includes of php_random.h (#13131) Before this change php_random.h was listed in 146 different *.dep files for a env CC=clang ./configure --without-sqlite3 --without-pdo-sqlite build, after this change it's only listed in 110 of them, preventing uselessly recompiling those files when working on ext/random, mostly caused by the include in ext/standard/basic_functions.h.
show more ...
|