mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Backport Lexbor changes to 8.4
This commit is contained in:
parent
19ffe572bb
commit
91665eaa63
3 changed files with 5 additions and 6 deletions
|
@ -65,7 +65,7 @@ lexbor_in_node_make(lexbor_in_t *incoming, lexbor_in_node_t *last_node,
|
|||
|
||||
node->opt = LEXBOR_IN_OPT_UNDEF;
|
||||
node->begin = buf;
|
||||
node->end = buf + buf_size;
|
||||
node->end = buf ? (buf + buf_size) : NULL;
|
||||
node->use = buf;
|
||||
|
||||
if (last_node != NULL) {
|
||||
|
|
|
@ -133,6 +133,10 @@ lexbor_str_append(lexbor_str_t *str, lexbor_mraw_t *mraw,
|
|||
{
|
||||
lxb_char_t *data_begin;
|
||||
|
||||
if (length == 0) {
|
||||
return str->data;
|
||||
}
|
||||
|
||||
lexbor_str_check_size_arg_m(str, lexbor_str_size(str),
|
||||
mraw, (length + 1), NULL);
|
||||
|
||||
|
|
|
@ -248,11 +248,6 @@ lxb_dom_node_t *
|
|||
lxb_dom_node_destroy(lxb_dom_node_t *node)
|
||||
{
|
||||
lxb_dom_node_remove(node);
|
||||
|
||||
if (node->owner_document->ev_destroy != NULL) {
|
||||
node->owner_document->ev_destroy(node);
|
||||
}
|
||||
|
||||
return lxb_dom_document_destroy_interface(node);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue