diff: fix bug in error/1
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Jul 13 02:19:48 AEST 1998
Fix a bug that broke error/1 in grades `jump.*' and `fast.*'.
library/require.m:
Rename the C module `require_module_internal' as
`require_internal_module', to be consistent with the names
used for other C modules defined in the Mercury library.
Add code to ensure that the initialization function
for this module gets run.
Index: library/require.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/require.m,v
retrieving revision 1.22
diff -u -r1.22 require.m
--- require.m 1998/05/28 11:13:59 1.22
+++ require.m 1998/07/12 16:12:55
@@ -1,8 +1,8 @@
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
% Copyright (C) 1993-1998 The University of Melbourne.
% This file may only be copied under the terms of the GNU Library General
% Public License - see the file COPYING.LIB in the Mercury distribution.
-%---------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
:- module require.
@@ -75,7 +75,7 @@
MR_MAKE_STACK_LAYOUT_ENTRY(mercury__require__error_internal_1_0);
-BEGIN_MODULE(require_module_internal)
+BEGIN_MODULE(require_internal_module)
init_entry(mercury__require__error_internal_1_0);
BEGIN_CODE
@@ -94,6 +94,18 @@
END_MODULE
").
+/*
+** Ensure that the initialization function for the above module gets run.
+*/
+/*
+INIT sys_init_require_internal_module
+*/
+extern ModuleFunc require_internal_module;
+void sys_init_require_internal_module(void);
+void sys_init_require_internal_module(void) {
+ require_internal_module();
+").
+
:- end_module require.
-/*---------------------------------------------------------------------------*/
+%-----------------------------------------------------------------------------%
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list