Chris Howie

Results 121 comments of Chris Howie

On my version of Mono (3.12.1), `Marshal.PtrToStringAnsi()` returns `null` on this string, which isn't correct behavior. (It should only return `null` when the input `IntPtr` is not equal to `IntPtr.Zero`.)...

Yes, but that approach has its own disadvantages. After a Lua string value is converted to a `LuaString`, all ties to the string object in Lua are broken. This means...

Not without breaking the CLR -> Lua -> CLR path. CLR strings are made of chars, which are 2-byte elements. If a char has an ordinal value out of the...

> But the CLR -> Lua -> CLR path was never correct. Well, then that's a bug. :smiley: The best way I can think to resolve this issue would be...

That's precisely the problem. There is a mismatch between CLR strings and Lua strings. There needs to be a compromise on how that's handled somewhere. If all Lua strings get...

This change is going to be fairly invasive, so it may not be ready soon. I effectively need to replace every Lua library API that accepts a string to accept...

The approach I'm taking now is to add a `byte[]` constructor to `LuaString`. This solves the problem of how to get a CLR byte-string into Lua without conversion. When marshalling...

I have pushed a fix for this issue to the lua-string-marshal branch. There are new tests to verify the new behavior. Please test and let me know if you have...

@charlenni Have you been able to test the fix yet?

Thanks. I will get the branch merged soon.