This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #113718] Add inline.h
authorFather Chrysostomos <sprout@cpan.org>
Fri, 17 Aug 2012 04:54:53 +0000 (21:54 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 21 Aug 2012 23:38:34 +0000 (16:38 -0700)
We can put static inline functions here, and they can depend on
function prototypes and struct definitions from other header
files.

MANIFEST
inline.h [new file with mode: 0644]
perl.h

index 7484cd6..c185c98 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -4192,6 +4192,7 @@ hints/vmesa.sh                    Hints for named architecture
 hints/vos.sh                   Hints for named architecture
 hv.c                           Hash value code
 hv.h                           Hash value header
+inline.h                       Static inline functions
 INSTALL                                Detailed installation instructions
 installhtml                    Perl script to install html files for pods
 install_lib.pl                 functions shared between install* scripts
diff --git a/inline.h b/inline.h
new file mode 100644 (file)
index 0000000..608f6c4
--- /dev/null
+++ b/inline.h
@@ -0,0 +1,13 @@
+/*    inline.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.
+ *
+ * Each section names the header file that the functions "belong" to.
+ */
diff --git a/perl.h b/perl.h
index 14f9083..9c7a027 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -5083,6 +5083,9 @@ END_EXTERN_C
 #undef PERLVARI
 #undef PERLVARIC
 
+/* Static inline functions that depend on headers included above */
+#include "inline.h"
+
 START_EXTERN_C
 
 /* dummy variables that hold pointers to both runops functions, thus forcing