summaryrefslogtreecommitdiff
path: root/embed.fnc
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>2013-03-27 15:54:05 -0400
committerAndy Dougherty <doughera@lafayette.edu>2013-03-28 16:49:37 -0400
commit43387ee1abcd83c3c7586b7f7aa86e838d239aac (patch)
tree89766800af3f0f19490b84e6f9bb305ac8cc578b /embed.fnc
parentcbe4d57f99858fe05f2e924ad9125b9b9e50504e (diff)
downloadperl-43387ee1abcd83c3c7586b7f7aa86e838d239aac.tar.gz
Remove the non-inline function S_croak_memory_wrap from inline.h.
This appears to resolve these three related tickets: [perl #116989] S_croak_memory_wrap breaks gcc warning flags detection [perl #117319] Can't include perl.h without linking to libperl [perl #117331] Time::HiRes::clock_gettime not implemented on Linux (regression?) This patch changes S_croak_memory_wrap from a static (but not inline) function into an ordinary exported function Perl_croak_memory_wrap. This has the advantage of allowing programs (particuarly probes, such as in cflags.SH and Time::HiRes) to include perl.h without linking against libperl. Since it is not a static function defined within each compilation unit, the optimizer can no longer remove it when it's not needed or inline it as needed. This likely negates some of the savings that motivated the original commit 380f764c1ead36fe3602184804292711. However, calling the simpler function Perl_croak_memory_wrap() still does take less set-up than the previous version, so it may still be a slight win. Specific cross-platform measurements are welcome.
Diffstat (limited to 'embed.fnc')
-rw-r--r--embed.fnc2
1 files changed, 1 insertions, 1 deletions
diff --git a/embed.fnc b/embed.fnc
index 6f3adc6148..ecdde732c1 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -265,6 +265,7 @@ Anprd |void |croak_no_modify
Anprd |void |croak_xs_usage |NN const CV *const cv \
|NN const char *const params
npr |void |croak_no_mem
+nroX |void |Perl_croak_memory_wrap
nprX |void |croak_popstack
#if defined(WIN32)
norx |void |win32_croak_not_implemented|NN const char * fname
@@ -1608,7 +1609,6 @@ Anpa |Malloc_t|safesysmalloc |MEM_SIZE nbytes
Anpa |Malloc_t|safesyscalloc |MEM_SIZE elements|MEM_SIZE size
Anpa |Malloc_t|safesysrealloc|Malloc_t where|MEM_SIZE nbytes
Anp |Free_t |safesysfree |Malloc_t where
-Asrnx |void |croak_memory_wrap
#if defined(PERL_GLOBAL_STRUCT)
Ap |struct perl_vars *|GetVars
Ap |struct perl_vars*|init_global_struct