summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2015-01-28 08:46:28 +0000
committerSteve Hay <steve.m.hay@googlemail.com>2015-01-28 08:46:28 +0000
commit0c5a1073d3e8debefdaa5b534337acb1b0c060ef (patch)
tree5ff7df67603aa4499f9a27b9dff531faa30ab52c /embed.fnc
parent4932eecad028c2cea4d6a7602933bc677c540fb5 (diff)
downloadperl-0c5a1073d3e8debefdaa5b534337acb1b0c060ef.tar.gz
Correction to 0563a5d0db
Functions marked "b" do not have to be in mathoms.c after all. That was partly based on the belief (from e4524c4c2a) that "b" functions have their proto.h entries skipped, but that is not the case. It is "m" functions (macros) that have their proto.h entries skipped. The confusion may have arisen because all but four current "b" functions have "m" as well anyway. However, even functions marked "b" and "m" do not absolutely have to be in mathoms.c. At the time of writing they all are, which is convenient for having the symbols marked EXTERN_C, which is required to unmangle the exported names in a C++ build (see d447858807). Their presence in mathoms.c will also have them skipped from -DNO_MATHOMS builds (as of 075eb5c9b6). But it is possible for "bm" functions to exist elsewhere as long as they are explicitly marked EXTERN_C. In that case they won't be automatically skipped for -DNO_MATHOMS builds either, which may or may not require special attention too. Thanks to Craig A. Berry for pointing out that 0563a5d0db wasn't quite correct.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc12
1 files changed, 8 insertions, 4 deletions
diff --git a/embed.fnc b/embed.fnc
index 220acd7e32..61049a9a73 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -27,10 +27,14 @@
:
: proto.h: add __attribute__malloc__
:
-: b Binary backward compatibility; function is a macro
-: but has also Perl_ implementation (which is exported); must be
-: implemented in mathoms.c (whose compilation can be suppressed; see
-: INSTALL) as commit 075eb5c9b6:
+: b Binary backward compatibility; has an exported Perl_ implementation
+: but function is also normally a macro (i.e. has the "m" flag as well).
+: Backcompat functions ("b") can be anywhere, but if they are also
+: macros ("m") then they have no proto.h entries so must either be in
+: mathoms.c to get marked EXTERN_C (and skipped for -DNO_MATHOMS builds)
+: or else will require special attention to ensure they are marked
+: EXTERN_C (and then won't be automatically skipped for -DNO_MATHOMS
+: builds).
:
: add entry to the list of exported symbols;
: don't define PERL_ARGS_ASSERT_FOO