Rename files which are #included (#708)

We have four files which have .c extensions, but which are actually #included rather than treated as their own compilation unit.

This goes against conventions - Autotools, CMake, and Bazel all assume that the .h/.c distinction indicates which files are compilation units.

pcre2_jit_match.c -> _inc.h
pcre2_jit_misc.c -> _inc.h
pcre2_printint.c -> _inc.h
pcre2_ucptables.c -> _inc.h
This commit is contained in:
Nicholas Wilson
2025-02-27 06:57:44 +00:00
committed by GitHub
parent d9a49724de
commit b79ee1dea5
22 changed files with 55 additions and 83 deletions

View File

@@ -3,7 +3,7 @@
# PCRE2 UNICODE PROPERTY SUPPORT
# ------------------------------
# This script generates the pcre2_ucptables.c file, which contains tables for
# This script generates the pcre2_ucptables_inc.h file, which contains tables for
# recognizing Unicode property names. It is #included by pcre2_tables.c. In
# order to reduce the number of relocations when loading the PCRE2 library, the
# names are held as a single large string, with offsets in the table. This is
@@ -60,7 +60,7 @@ from GenerateCommon import \
# Open the output file (no return on failure). This call also writes standard
# header boilerplate.
f = open_output("pcre2_ucptables.c")
f = open_output("pcre2_ucptables_inc.h")
# The list in bidi_classes contains just the Unicode classes such as AN, LRE,
# etc., along with comments. We need to add "bidi" in front of each value, in
@@ -195,7 +195,7 @@ const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
#endif /* SUPPORT_UNICODE */
/* End of pcre2_ucptables.c */
/* End of pcre2_ucptables_inc.h */
""")
f.close