Looks good, I just changed the variable usage to look like the rest of the code and using the gint32 and gunichar2.
I also changed the only place where I saw that the gunichar2 was not used (Pad). - Patrik > -----Original Message----- > From: Duncan Mak [mailto:[EMAIL PROTECTED]] > Sent: den 22 april 2002 07:23 > To: Mono mailing list > Subject: Re: [Mono-list] System.String::.ctor cant be resolved > > > On Sun, 2002-04-21 at 11:40, Duncan Mak wrote: > > > > Yeah, I'm working on these. I should be done soon. > > > > Attached is a patch for the 4 missing string constructors in > string-icall.c > > /* unsafe public String (char *value); */ > MonoString * > mono_string_Internal_ctor_charp (gpointer dummy, gunichar2 *value) > > /* unsafe public String (char *value, int startIndex, int > length); */ MonoString * > mono_string_Internal_ctor_charp_int_int (gpointer dummy, > gunichar2 *value, gint32 sindex, gint32 length) > > /* unsafe public String (sbyte *value); */ > MonoString * > mono_string_Internal_ctor_sbytep (gpointer dummy, gint8 *value) > > /* unsafe public String (sbyte *value, int startIndex, int > length); */ MonoString * > mono_string_Internal_ctor_sbytep_int_int (gpointer dummy, > gint8 *value, gint32 sindex, gint32 length) > > I took Dietmar's advice and simply looked at the original C# > implementation of the constructors and translated them into > the C equivalent. > > The only testing I did is to try and build them, and they built. > > I'm not an experienced C programmer, so please tell me if > there is anything wrong with the patch and I'll fix them ASAP. > > Also, Dietmar also told me to go thru the new string code and > standardize the naming of the types -- ie, gunichar2 * and > guint16 * are used interchangably right now. I'll go in and > change them tomorrow afternoon. I'll be using > mono/mono/docs/internal-call as my guide. > > Duncan. > _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
