[m-rev.] more .NET fixes/work-arounds (not committed)

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Feb 16 16:03:33 AEDT 2003


Ooops.  Really ought to test things a bit more before committing them.
Changing the type of the argument to the C foreign_proc for
concat_string_list broke the C code.

Estimated hours taken: 0.25
Branches: main

compiler/stack_layout.m:
	Fix a bug in my previous change, which stopped it compiling in
	non-IL grades.

Workspace: /home/ceres/fjh/mercury
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.74
diff -u -d -r1.74 stack_layout.m
--- compiler/stack_layout.m	16 Feb 2003 02:14:16 -0000	1.74
+++ compiler/stack_layout.m	16 Feb 2003 04:54:16 -0000
@@ -153,10 +153,16 @@
 
 	% concat_string_list appends a list of strings together,
 	% appending a null character after each string.
-	% The resulting string will contain embedded null characters.
+	% The resulting string will contain embedded null characters,
 :- pred stack_layout__concat_string_list(list(string)::in, int::in,
 	string_with_0s::out) is det.
 
+concat_string_list(Strings, Len, string_with_0s(Result)) :-
+	concat_string_list_2(Strings, Len, Result).
+
+:- pred stack_layout__concat_string_list_2(list(string)::in, int::in,
+	string::out) is det.
+
 :- pragma c_header_code("
 	#include ""mercury_tags.h""	/* for MR_list_*() */
 	#include ""mercury_heap.h""	/* for MR_incr_hp_atomic*() */
@@ -164,7 +170,7 @@
 ").
 
 :- pragma foreign_proc("C",
-	stack_layout__concat_string_list(StringList::in, ArenaSize::in,
+	stack_layout__concat_string_list_2(StringList::in, ArenaSize::in,
 		Arena::out),
 	[will_not_call_mercury, promise_pure, thread_safe],
 "{
@@ -200,7 +206,7 @@
 % Note that this version only works if the Mercury implementation's
 % string representation allows strings to contain embedded null
 % characters.  So we check that.
-concat_string_list(StringsList, _Len, string_with_0s(StringWithNulls)) :-
+concat_string_list_2(StringsList, _Len, StringWithNulls) :-
 	(	
 		char__to_int(NullChar, 0),
 		NullCharString = string__char_to_string(NullChar),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list