summaryrefslogtreecommitdiff
path: root/intrpvar.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-01-29 00:09:10 +0000
committerNicholas Clark <nick@ccl4.org>2006-01-29 00:09:10 +0000
commitd0647d4e83baeaee38f56423fa99ba248e8c0db2 (patch)
tree7a53736d02067ea7c5ddf028077d0e949d72650f /intrpvar.h
parent90e5519e3100e145a0051dac121e038bd45695c6 (diff)
downloadperl-d0647d4e83baeaee38f56423fa99ba248e8c0db2.tar.gz
Avoid using space to create 2 functions just to force mathoms to be
linked. Instead, force the link via the perl interpreter structure via a function pointer that gets replaced at run time anyway. p4raw-id: //depot/perl@26990
Diffstat (limited to 'intrpvar.h')
-rw-r--r--intrpvar.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/intrpvar.h b/intrpvar.h
index aa0f0c3365..3d3db7aafb 100644
--- a/intrpvar.h
+++ b/intrpvar.h
@@ -484,7 +484,14 @@ PERLVAR(Ireentrant_retint, int) /* Integer return value from reentrant functions
/* Hooks to shared SVs and locks. */
PERLVARI(Isharehook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing))
PERLVARI(Ilockhook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing))
-PERLVARI(Iunlockhook, share_proc_t, MEMBER_TO_FPTR(Perl_sv_nosharing))
+#ifdef NO_MATHOMS
+# define PERL_UNLOCK_HOOK Perl_sv_nosharing
+#else
+/* This reference ensures that the mathoms are linked with perl */
+# define PERL_UNLOCK_HOOK Perl_sv_nounlocking
+#endif
+PERLVARI(Iunlockhook, share_proc_t, MEMBER_TO_FPTR(PERL_UNLOCK_HOOK))
+
PERLVARI(Ithreadhook, thrhook_proc_t, MEMBER_TO_FPTR(Perl_nothreadhook))
/* Force inclusion of both runops options */