bugDotGNU Portable.NET - Bugs: bug #2341, ilrun does not support...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #2341: ilrun does not support MarshalAs(UnmanagedType.LPWStr)

Submitted by:  Marcus Urban <mathpup>
Submitted on:  Mon 20 Jan 2003 11:17:12 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 28 Jan 2003 06:25:19 AM UTC, comment #4:

Fix applied, 28 Jan 2003

Rhys Weatherley <rweather>
Project Administrator
Mon 20 Jan 2003 11:43:41 PM UTC, comment #3:

Just go in and fix it and Gopal or I will close once the
patch comes in - we know you're working on it now.

The bug won't be in the compiler. It will be in the
runtime engine's marshalling routines. You'll need to add
a new string marshalling type to include/il_meta.h
(IL_META_MARSHAL_*) and detect it in image/marshal.c.

Then you'll have to add two new CVM instructions to convert
betweeen C# strings and UTF-16 strings, and back again
(engine/cvm_conv.c). And finally, you'll have to modify
the marshal support code in engine/cvmc_setup.c and
engine/pinvoke.c.

Rhys Weatherley <rweather>
Project Administrator
Mon 20 Jan 2003 11:28:35 PM UTC, comment #2:

Can you please assign this to me, i promised mathpup i would look into it.

James Michael DuPont <mdupont>
Mon 20 Jan 2003 11:21:33 PM UTC, comment #1:

Compile char.c to libchar.so: gcc -shared -o libchar.so char.c
and make share that libchar.so is found by the linker (export LD_LIBRARY_PATH=...). Then compile and run LPWStr.cs.

The last line should print 65 66 67, but instead it prints 16961 67 0.

Marcus Urban <mathpup>
Mon 20 Jan 2003 11:17:12 PM UTC, original submission:

ilrun does not support marshalling strings using the MarshalAs(UnmanagedType.LPWStr). This attribute instructs the runtime to marshal the characters of a System.String as 16-bit unicode characters instead of 8-bit ANSI chars.

Marcus Urban <mathpup>

 

Attached Files
file #247:  char.c added by mathpup (173B - text/x-csrc - Test case)
file #246:  LPWStr.cs added by mathpup (373B - text/x-csharp - Test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 28 Jan 2003 06:25:19 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1