[m-rev.] diff: rtti_implementation type bug on .NET

Peter Ross pro at missioncriticalit.com
Fri Nov 14 00:41:54 AEDT 2003


On Fri, Nov 14, 2003 at 12:32:42AM +1100, Fergus Henderson wrote:
> On 13-Nov-2003, Peter Ross <pro at missioncriticalit.com> wrote:
> > -:- func null = T.
> > +:- func null_string = string.
> >  :- pragma foreign_proc("C",
> > -	null = (T::out),
> > +	null_string = (Str::out),
> >  	[will_not_call_mercury, thread_safe, promise_pure],
> >  "
> > -	T = (MR_Word) NULL;
> > +	Str = (MR_Word) NULL;
> 
> That line will be a type error now.
> 
Didn't actually cause any problems, but it is deleted now.

> I think you just need to delete the cast.
> But please check that it compiles in non-IL grades without any warnings.
> 
It compiles fine both before and after in asm_fast.gc.


===================================================================


Estimated hours taken: 0.1
Branches: main

library/rtti_implementation.m:
	Delete uneeded cast in the C version of null_string.


Index: rtti_implementation.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/rtti_implementation.m,v
retrieving revision 1.47
diff -u -r1.47 rtti_implementation.m
--- rtti_implementation.m	13 Nov 2003 12:08:58 -0000	1.47
+++ rtti_implementation.m	13 Nov 2003 13:40:39 -0000
@@ -2266,7 +2266,7 @@
 	null_string = (Str::out),
 	[will_not_call_mercury, thread_safe, promise_pure],
 "
-	Str = (MR_Word) NULL;
+	Str = NULL;
 ").
 :- pragma foreign_proc("C#",
 	null_string = (Str::out),

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