Add empty inline_invlist.c
authorKarl Williamson <public@khwilliamson.com>
Thu, 23 Aug 2012 00:30:59 +0000 (18:30 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sun, 26 Aug 2012 05:21:27 +0000 (23:21 -0600)
This will be used for things need to handle inversion lists in the three
files that currently use them.  I'm putting this in a separate hdr,
because inversion lists are very internal-only, so should not be grouped
in with things that there is an external API for.  It is a dot-c file so
that the functions can continue to be declared with embed.fnc, and
porting/args_assert.t will continue to work, as it looks only in .c
files.

MANIFEST
ext/re/Makefile.PL
inline_invlist.c [new file with mode: 0644]
regcomp.c
regexec.c
utf8.c

index c185c98..4a8e104 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4193,6 +4193,7 @@ hints/vos.sh                      Hints for named architecture
 hv.c                           Hash value code
 hv.h                           Hash value header
 inline.h                       Static inline functions
+inline_invlist.c               Inline functions for handling inversion lists
 INSTALL                                Detailed installation instructions
 installhtml                    Perl script to install html files for pods
 install_lib.pl                 functions shared between install* scripts
index a973352..c6338c7 100644 (file)
@@ -25,24 +25,29 @@ sub postamble {
     my $regcomp_c = upupfile('regcomp.c');
     my $regexec_c = upupfile('regexec.c');
     my $dquote_static_c = upupfile('dquote_static.c');
+    my $inline_invlist_c = upupfile('inline_invlist.c');
 
     <<EOF;
 re_comp.c : $regcomp_c
        - \$(RM_F) re_comp.c
        \$(CP) $regcomp_c re_comp.c
 
-re_comp\$(OBJ_EXT) : re_comp.c dquote_static.c
+re_comp\$(OBJ_EXT) : re_comp.c dquote_static.c inline_invlist.c
 
 re_exec.c : $regexec_c
        - \$(RM_F) re_exec.c
        \$(CP) $regexec_c re_exec.c
 
-re_exec\$(OBJ_EXT) : re_exec.c
+re_exec\$(OBJ_EXT) : re_exec.c inline_invlist.c
 
 dquote_static.c : $dquote_static_c
        - \$(RM_F) dquote_static.c
        \$(CP) $dquote_static_c dquote_static.c
 
+inline_invlist.c : $inline_invlist_c
+       - \$(RM_F) inline_invlist.c
+       \$(CP) $inline_invlist_c inline_invlist.c
+
 EOF
 }
 
diff --git a/inline_invlist.c b/inline_invlist.c
new file mode 100644 (file)
index 0000000..de6738f
--- /dev/null
@@ -0,0 +1,16 @@
+/*    invlist.h
+ *
+ *    Copyright (C) 2012 by Larry Wall and others
+ *
+ *    You may distribute under the terms of either the GNU General Public
+ *    License or the Artistic License, as specified in the README file.
+ *
+ * This file is a home for static inline functions that cannot go in other
+ * headers files, because they depend on proto.h (included after most other
+ * headers) or struct definitions.
+ *
+ */
+
+#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+
+#endif
index 5fb6532..87dc545 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -88,6 +88,7 @@ extern const struct regexp_engine my_reg_engine;
 
 #include "dquote_static.c"
 #include "charclass_invlists.h"
+#include "inline_invlist.c"
 
 #define HAS_NONLATIN1_FOLD_CLOSURE(i) _HAS_NONLATIN1_FOLD_CLOSURE_ONLY_FOR_USE_BY_REGCOMP_DOT_C_AND_REGEXEC_DOT_C(i)
 #define IS_NON_FINAL_FOLD(c) _IS_NON_FINAL_FOLD_ONLY_FOR_USE_BY_REGCOMP_DOT_C(c)
index 352b279..bad40dc 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -80,6 +80,8 @@
 #  include "regcomp.h"
 #endif
 
+#include "inline_invlist.c"
+
 #define RF_tainted     1       /* tainted information used? e.g. locale */
 #define RF_warned      2               /* warned about big count? */
 
diff --git a/utf8.c b/utf8.c
index bff873b..39a6350 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -31,6 +31,7 @@
 #include "EXTERN.h"
 #define PERL_IN_UTF8_C
 #include "perl.h"
+#include "inline_invlist.c"
 
 #ifndef EBCDIC
 /* Separate prototypes needed because in ASCII systems these are