diff: private_builtin.m bug fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Thu May 28 00:45:43 AEST 1998


library/private_builtin.m:
	Add declarations of some things defined in library/builtin.m.
	This fixes some bugs that I introduced when splitting up
	mercury_builtin.m that broke things in non-gc grades.

Index: private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.1
diff -u -u -r1.1 private_builtin.m
--- private_builtin.m	1998/05/25 21:47:42	1.1
+++ private_builtin.m	1998/05/27 14:41:03
@@ -512,8 +512,6 @@
 compare_error :-
 	error("internal error in compare/3").
 
-:- pragma c_header_code("#include ""mercury_type_info.h"""). % XXX needed?
-
 %-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
 
@@ -524,6 +522,9 @@
 :- type ml_answer_block == c_pointer.
 
 :- pragma c_header_code("
+
+#include ""mercury_deep_copy.h""
+#include ""mercury_type_info.h""
 	
 	/* Used to mark the status of the table */
 #define ML_UNINITIALIZED	0
@@ -616,6 +617,23 @@
 :- pragma c_code(table_create_ans_block(T0::in, Size::in, T::out) ,"
 	MR_TABLE_CREATE_ANSWER_BLOCK(T0, Size);
 	T = T0;
+").
+
+:- pragma c_header_code("
+
+extern MR_STATIC_CODE_CONST struct
+	mercury_data___base_type_info_int_0_struct
+	mercury_data___base_type_info_int_0;
+extern MR_STATIC_CODE_CONST struct
+	mercury_data___base_type_info_string_0_struct
+	mercury_data___base_type_info_string_0;
+extern MR_STATIC_CODE_CONST struct
+	mercury_data___base_type_info_float_0_struct
+	mercury_data___base_type_info_float_0;
+extern MR_STATIC_CODE_CONST struct
+	mercury_data___base_type_info_character_0_struct
+	mercury_data___base_type_info_character_0;
+
 ").
 
 :- pragma c_code(table_save_int_ans(T::in, Offset::in, I::in), 

-- 
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