[Mono-devel-list] Patch for ToUpper/ToLower

Andreas Nahr ClassDevelopment at A-SoftTech.com
Sat Apr 24 04:47:11 EDT 2004

We should not make the null check in unmanaged code.
Also the shortcut for invariant code should not be taken to c land (as it is
currently) - I'll explain in another posting why.

I've made a patch which is the neccessary C# part for it. Perhaps you could
make and test the C part (renaming the function and removing the invariant
shortcut from the Char functions)

The same thing is true for String (it's even more important there because
e.g. for String.ToLower() we can guarantee that it never calles with a null)
Already applied the String one as it is trivial


----- Original Message ----- 
From: "Robert Shade" <rshade at dvsconsulting.com>
To: <mono-devel-list at lists.ximian.com>
Sent: Saturday, April 24, 2004 12:07 AM
Subject: [Mono-devel-list] Patch for ToUpper/ToLower

> According to the documentation, String.ToUpper/ToLower and
> Char.ToUpper/ToLower should throw an ArgumentNullException if the
> CultureInfo argument is null.  Attached is a patch to do just that.  My
> only question is if it would have been better to use
> MONO_CHECK_ARG_NULL from object.h.  I wasn't sure if that would abort
> the current function or not.  If if MONO_CHECK_ARG_NULL would be
> preferred, I can resubmit.  Either way I would need someone to commit
> this for me as I don't have CVS access.
> Thanks.
> Rob
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PatchChar.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040424/887aa5af/attachment.txt 

More information about the Mono-devel-list mailing list