dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]lib_dir.c: InvalidPathChars


From: Gopal V
Subject: Re: [DotGNU]lib_dir.c: InvalidPathChars
Date: Fri, 13 Dec 2002 07:40:17 +0530
User-agent: Mutt/1.2.5i

If memory serves me right, Rhys Weatherley wrote:
>     /* Allocate the "invalidPathChars" array */
>     array = (System_Array *)ILExecThreadNew(thread, "[c", "(Ti)V",
>                                             (ILVaInt)length);

To put another point accross "[c" == array of chars , and "(Ti)V" is
func with args (this,int) returning Void ...

This is the internal way of doing "new char[length]";

>     buf = (ILUInt16 *)(ArrayToBuffer(array));

This removes the icky array headers and frees you from all the regular
bound checking issues IL arrays have ...

Usually we keep doing 'buf++' because bound checking does not matter,
and we get clear segfaults for errors instead of unexplainable behaviour ;-)

Gopal
-- 
The difference between insanity and genius is measured by success


reply via email to

[Prev in Thread] Current Thread [Next in Thread]