[m-rev.] diff: IL back-end: fix bug in string__to_int_list

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Aug 4 03:13:19 AEST 2001


This one broke tests/benchmarks/query.exe.

Estimated hours taken: 2
Branches: main

library/string.m:
	Fix a bug in Tyson's previous change:
	in string__to_int_list, cast the value from System.Char
	to MR_Integer (i.e. System.Int32) before boxing it.

Workspace: /mnt/venus/home/venus/fjh/ws-venus4/mercury
Index: library/string.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/string.m,v
retrieving revision 1.150
diff -u -d -r1.150 string.m
--- library/string.m	2001/08/01 00:31:18	1.150
+++ library/string.m	2001/08/03 17:04:55
@@ -1662,8 +1662,7 @@
         MR_list_nil(prev);
 
         for (i = length - 1; i >= 0; i--) {
-		MR_list_cons(tmp, __box(Str->get_Chars(i)),
-			prev);
+		MR_list_cons(tmp, __box((MR_Integer) Str->get_Chars(i)), prev);
 		prev = tmp;
         }
         IntList = tmp;

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