Backport Lexbor changes to 8.4

This commit is contained in:
Niels Dossche 2025-08-10 14:17:19 +02:00
parent 19ffe572bb
commit 91665eaa63
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
3 changed files with 5 additions and 6 deletions

View file

@ -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) {

View file

@ -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);

View file

@ -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);
}