Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions ext/dom/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,32 @@ if test "$PHP_DOM" != "no"; then
$LEXBOR_DIR/core/shs.c
$LEXBOR_DIR/core/str.c
$LEXBOR_DIR/core/strtod.c
$LEXBOR_DIR/css/at_rule.c
$LEXBOR_DIR/css/at_rule/state.c
$LEXBOR_DIR/css/blank.c
$LEXBOR_DIR/css/css.c
$LEXBOR_DIR/css/declaration.c
$LEXBOR_DIR/css/log.c
$LEXBOR_DIR/css/parser.c
$LEXBOR_DIR/css/property.c
$LEXBOR_DIR/css/property/state.c
$LEXBOR_DIR/css/rule.c
$LEXBOR_DIR/css/selectors/pseudo_state.c
$LEXBOR_DIR/css/selectors/pseudo.c
$LEXBOR_DIR/css/selectors/selector.c
$LEXBOR_DIR/css/selectors/selectors.c
$LEXBOR_DIR/css/selectors/state.c
$LEXBOR_DIR/css/state.c
$LEXBOR_DIR/css/stylesheet.c
$LEXBOR_DIR/css/syntax/anb.c
$LEXBOR_DIR/css/syntax/parser.c
$LEXBOR_DIR/css/syntax/state.c
$LEXBOR_DIR/css/syntax/syntax.c
$LEXBOR_DIR/css/syntax/token.c
$LEXBOR_DIR/css/syntax/tokenizer.c
$LEXBOR_DIR/css/syntax/tokenizer/error.c
$LEXBOR_DIR/css/unit.c
$LEXBOR_DIR/css/value.c
$LEXBOR_DIR/dom/interface.c
$LEXBOR_DIR/dom/interfaces/attr.c
$LEXBOR_DIR/dom/interfaces/cdata_section.c
Expand Down Expand Up @@ -118,7 +128,9 @@ if test "$PHP_DOM" != "no"; then
$LEXBOR_DIR/html/interfaces/progress_element.c
$LEXBOR_DIR/html/interfaces/quote_element.c
$LEXBOR_DIR/html/interfaces/script_element.c
$LEXBOR_DIR/html/interfaces/search_element.c
$LEXBOR_DIR/html/interfaces/select_element.c
$LEXBOR_DIR/html/interfaces/selectedcontent_element.c
$LEXBOR_DIR/html/interfaces/slot_element.c
$LEXBOR_DIR/html/interfaces/source_element.c
$LEXBOR_DIR/html/interfaces/span_element.c
Expand All @@ -139,6 +151,7 @@ if test "$PHP_DOM" != "no"; then
$LEXBOR_DIR/html/interfaces/video_element.c
$LEXBOR_DIR/html/interfaces/window.c
$LEXBOR_DIR/html/parser.c
$LEXBOR_DIR/html/tag.c
$LEXBOR_DIR/html/token_attr.c
$LEXBOR_DIR/html/token.c
$LEXBOR_DIR/html/tokenizer.c
Expand Down Expand Up @@ -168,8 +181,6 @@ if test "$PHP_DOM" != "no"; then
$LEXBOR_DIR/html/tree/insertion_mode/in_head_noscript.c
$LEXBOR_DIR/html/tree/insertion_mode/in_head.c
$LEXBOR_DIR/html/tree/insertion_mode/in_row.c
$LEXBOR_DIR/html/tree/insertion_mode/in_select_in_table.c
$LEXBOR_DIR/html/tree/insertion_mode/in_select.c
$LEXBOR_DIR/html/tree/insertion_mode/in_table_body.c
$LEXBOR_DIR/html/tree/insertion_mode/in_table_text.c
$LEXBOR_DIR/html/tree/insertion_mode/in_table.c
Expand Down Expand Up @@ -225,6 +236,8 @@ if test "$PHP_DOM" != "no"; then
PHP_ADD_BUILD_DIR([
$ext_builddir/parentnode
$ext_builddir/$LEXBOR_DIR/core
$ext_builddir/$LEXBOR_DIR/css/at_rule
$ext_builddir/$LEXBOR_DIR/css/property
$ext_builddir/$LEXBOR_DIR/css/selectors
$ext_builddir/$LEXBOR_DIR/css/syntax/tokenizer
$ext_builddir/$LEXBOR_DIR/css/tokenizer
Expand Down
10 changes: 6 additions & 4 deletions ext/dom/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ if (PHP_DOM == "yes") {
ADD_SOURCES("ext/dom/lexbor/lexbor/dom/interfaces", "attr.c cdata_section.c character_data.c comment.c document.c document_fragment.c document_type.c element.c node.c processing_instruction.c shadow_root.c text.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html/tokenizer", "error.c state_comment.c state_doctype.c state_rawtext.c state_rcdata.c state_script.c state.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html/tree", "active_formatting.c open_elements.c error.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html/tree/insertion_mode", "after_after_body.c after_after_frameset.c after_body.c after_frameset.c after_head.c before_head.c before_html.c foreign_content.c in_body.c in_caption.c in_cell.c in_column_group.c in_frameset.c in_head.c in_head_noscript.c initial.c in_row.c in_select.c in_select_in_table.c in_table_body.c in_table.c in_table_text.c in_template.c text.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html", "encoding.c interface.c parser.c token.c token_attr.c tokenizer.c tree.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html/tree/insertion_mode", "after_after_body.c after_after_frameset.c after_body.c after_frameset.c after_head.c before_head.c before_html.c foreign_content.c in_body.c in_caption.c in_cell.c in_column_group.c in_frameset.c in_head.c in_head_noscript.c initial.c in_row.c in_table_body.c in_table.c in_table_text.c in_template.c text.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html", "encoding.c interface.c parser.c tag.c token.c token_attr.c tokenizer.c tree.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/encoding", "decode.c encode.c encoding.c multi.c range.c res.c single.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html/interfaces", "anchor_element.c area_element.c audio_element.c base_element.c body_element.c br_element.c button_element.c canvas_element.c data_element.c data_list_element.c details_element.c dialog_element.c directory_element.c div_element.c d_list_element.c document.c element.c embed_element.c field_set_element.c font_element.c form_element.c frame_element.c frame_set_element.c head_element.c heading_element.c hr_element.c html_element.c iframe_element.c image_element.c input_element.c label_element.c legend_element.c li_element.c link_element.c map_element.c marquee_element.c media_element.c menu_element.c meta_element.c meter_element.c mod_element.c object_element.c o_list_element.c opt_group_element.c option_element.c output_element.c paragraph_element.c param_element.c picture_element.c pre_element.c progress_element.c quote_element.c script_element.c select_element.c slot_element.c source_element.c span_element.c style_element.c table_caption_element.c table_cell_element.c table_col_element.c table_element.c table_row_element.c table_section_element.c template_element.c text_area_element.c time_element.c title_element.c track_element.c u_list_element.c unknown_element.c video_element.c window.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/html/interfaces", "anchor_element.c area_element.c audio_element.c base_element.c body_element.c br_element.c button_element.c canvas_element.c data_element.c data_list_element.c details_element.c dialog_element.c directory_element.c div_element.c d_list_element.c document.c element.c embed_element.c field_set_element.c font_element.c form_element.c frame_element.c frame_set_element.c head_element.c heading_element.c hr_element.c html_element.c iframe_element.c image_element.c input_element.c label_element.c legend_element.c li_element.c link_element.c map_element.c marquee_element.c media_element.c menu_element.c meta_element.c meter_element.c mod_element.c object_element.c o_list_element.c opt_group_element.c option_element.c output_element.c paragraph_element.c param_element.c picture_element.c pre_element.c progress_element.c quote_element.c script_element.c search_element.c select_element.c selectedcontent_element.c slot_element.c source_element.c span_element.c style_element.c table_caption_element.c table_cell_element.c table_col_element.c table_element.c table_row_element.c table_section_element.c template_element.c text_area_element.c time_element.c title_element.c track_element.c u_list_element.c unknown_element.c video_element.c window.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/selectors-adapted", "selectors.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css", "state.c log.c parser.c css.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css", "at_rule.c blank.c css.c declaration.c log.c parser.c property.c rule.c state.c stylesheet.c unit.c value.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css/at_rule", "state.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css/property", "state.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css/selectors", "state.c selectors.c selector.c pseudo_state.c pseudo.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css/syntax", "state.c parser.c syntax.c anb.c tokenizer.c token.c", "dom");
ADD_SOURCES("ext/dom/lexbor/lexbor/css/syntax/tokenizer", "error.c", "dom");
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/html5_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ void lexbor_libxml2_bridge_report_errors(
tree_error,
tree_error->line + 1,
tree_error->column + 1,
tree_error->length
tree_error->end - tree_error->begin
);
}
index++;
Expand Down
6 changes: 5 additions & 1 deletion ext/dom/lexbor/lexbor/core/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern "C" {
#include "lexbor/core/lexbor.h"

#define LEXBOR_VERSION_MAJOR 2
#define LEXBOR_VERSION_MINOR 0
#define LEXBOR_VERSION_MINOR 8
#define LEXBOR_VERSION_PATCH 0

#define LEXBOR_VERSION_STRING LEXBOR_STRINGIZE(LEXBOR_VERSION_MAJOR) "." \
Expand All @@ -39,6 +39,10 @@ extern "C" {
#define lexbor_max(val1, val2) ((val1) > (val2) ? (val1) : (val2))
#define lexbor_min(val1, val2) ((val1) < (val2) ? (val1) : (val2))

#define LEXBOR_STR_RES_MAP_CHAR_OTHER 0x00
#define LEXBOR_STR_RES_MAP_CHAR_A_Z_a_z 0x01
#define LEXBOR_STR_RES_MAP_CHAR_WHITESPACE 0x02
#define LEXBOR_STR_RES_SLIP 0xFF

/*
* Very important!!!
Expand Down
2 changes: 2 additions & 0 deletions ext/dom/lexbor/lexbor/core/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,6 @@

#define LXB_EXTERN extern LXB_API

#define lxb_size(_size) ((size_t) (_size))

#endif /* LEXBOR_DEF_H */
36 changes: 32 additions & 4 deletions ext/dom/lexbor/lexbor/core/diyfp.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
/*
* Copyright (C) Alexander Borisov
* Copyright (C) 2015-2019 NGINX, Inc.
* Copyright (C) 2019-2025 F5, Inc.
* Copyright (C) 2015-2021 Igor Sysoev
* Copyright (C) 2017-2025 Dmitry Volyntsev
* Copyright (C) 2019-2022 Alexander Borisov
* Copyright (C) 2022-2025 Vadim Zhestikov
* All rights reserved.
*
* Based on nxt_diyfp.c from NGINX NJS project
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Copyright (C) Dmitry Volyntsev
* Copyright (C) NGINX, Inc.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

/*
* Copyright (C) Alexander Borisov
*
* Based on nxt_diyfp.h from NGINX NJS project
* An internal diy_fp implementation.
* For details, see Loitsch, Florian. "Printing floating-point numbers quickly
* and accurately with integers." ACM Sigplan Notices 45.6 (2010): 233-243.
*/


#include "lexbor/core/diyfp.h"


Expand Down
35 changes: 31 additions & 4 deletions ext/dom/lexbor/lexbor/core/diyfp.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
/*
* Copyright (C) Alexander Borisov
* Copyright (C) 2015-2019 NGINX, Inc.
* Copyright (C) 2019-2025 F5, Inc.
* Copyright (C) 2015-2021 Igor Sysoev
* Copyright (C) 2017-2025 Dmitry Volyntsev
* Copyright (C) 2019-2022 Alexander Borisov
* Copyright (C) 2022-2025 Vadim Zhestikov
* All rights reserved.
*
* Based on nxt_diyfp.h from NGINX NJS project
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Copyright (C) Dmitry Volyntsev
* Copyright (C) NGINX, Inc.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

/*
* Copyright (C) Alexander Borisov
*
* Based on nxt_diyfp.h from NGINX NJS project
* An internal diy_fp implementation.
* For details, see Loitsch, Florian. "Printing floating-point numbers quickly
* and accurately with integers." ACM Sigplan Notices 45.6 (2010): 233-243.
Expand Down
63 changes: 30 additions & 33 deletions ext/dom/lexbor/lexbor/core/dtoa.c
Original file line number Diff line number Diff line change
@@ -1,39 +1,36 @@
/*
* Copyright (C) Alexander Borisov
*
* Based on nxt_dtoa.c from NGINX NJS project
*
* Copyright (C) Dmitry Volyntsev
* Copyright (C) NGINX, Inc.
*
* Grisu2 algorithm implementation for printing floating-point numbers based
* upon the work of Milo Yip and Doug Currie.
*
* For algorithm information, see Loitsch, Florian. "Printing
* floating-point numbers quickly and accurately with integers." ACM Sigplan
* Notices 45.6 (2010): 233-243.
*
* Copyright (C) 2015 Doug Currie
* based on dtoa_milo.h
* Copyright (C) 2014 Milo Yip
* Copyright (C) 2015-2019 NGINX, Inc.
* Copyright (C) 2019-2025 F5, Inc.
* Copyright (C) 2015-2021 Igor Sysoev
* Copyright (C) 2017-2025 Dmitry Volyntsev
* Copyright (C) 2019-2022 Alexander Borisov
* Copyright (C) 2022-2025 Vadim Zhestikov
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

/*
* Copyright (C) Alexander Borisov
*/

#include "lexbor/core/str.h"
Expand Down
34 changes: 30 additions & 4 deletions ext/dom/lexbor/lexbor/core/dtoa.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
/*
* Copyright (C) Alexander Borisov
* Copyright (C) 2015-2019 NGINX, Inc.
* Copyright (C) 2019-2025 F5, Inc.
* Copyright (C) 2015-2021 Igor Sysoev
* Copyright (C) 2017-2025 Dmitry Volyntsev
* Copyright (C) 2019-2022 Alexander Borisov
* Copyright (C) 2022-2025 Vadim Zhestikov
* All rights reserved.
*
* Based on nxt_dtoa.h from NGINX NJS project
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* Copyright (C) Dmitry Volyntsev
* Copyright (C) Nginx, Inc.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/

/*
* Copyright (C) Alexander Borisov
*/

#ifndef LEXBOR_DTOA_H
Expand Down
9 changes: 5 additions & 4 deletions ext/dom/lexbor/lexbor/core/hash.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 Alexander Borisov
* Copyright (C) 2019-2026 Alexander Borisov
*
* Author: Alexander Borisov <borisov@lexbor.com>
*/
Expand All @@ -10,9 +10,10 @@

#include "lexbor/core/str.h"

#define LEXBOR_STR_RES_MAP_LOWERCASE
#define LEXBOR_STR_RES_MAP_UPPERCASE
#include "lexbor/core/str_res.h"
#ifndef LEXBOR_DISABLE_INTERNAL_EXTERN
LXB_EXTERN const lxb_char_t lexbor_str_res_map_lowercase[256];
LXB_EXTERN const lxb_char_t lexbor_str_res_map_uppercase[256];
#endif


/* Insert variable. */
Expand Down
3 changes: 1 addition & 2 deletions ext/dom/lexbor/lexbor/core/in.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/*
* Copyright (C) 2018 Alexander Borisov
* Copyright (C) 2018-2026 Alexander Borisov
*
* Author: Alexander Borisov <borisov@lexbor.com>
*/

#include "lexbor/core/in.h"
#include "lexbor/core/str_res.h"


lexbor_in_t *
Expand Down
10 changes: 5 additions & 5 deletions ext/dom/lexbor/lexbor/core/shs.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/*
* Copyright (C) 2018-2019 Alexander Borisov
* Copyright (C) 2018-2026 Alexander Borisov
*
* Author: Alexander Borisov <borisov@lexbor.com>
*/

#include "lexbor/core/shs.h"
#include "lexbor/core/str.h"

#define LEXBOR_STR_RES_MAP_LOWERCASE
#define LEXBOR_STR_RES_MAP_UPPERCASE
#include "lexbor/core/str_res.h"

#ifndef LEXBOR_DISABLE_INTERNAL_EXTERN
LXB_EXTERN const lxb_char_t lexbor_str_res_map_lowercase[256];
LXB_EXTERN const lxb_char_t lexbor_str_res_map_uppercase[256];
#endif

#define lexbor_shs_make_id_m(key, size, table_size) \
(((((key[0] * key[size - 1]) * key[0]) + size) % table_size) + 0x01)
Expand Down
Loading
Loading