GameCTO / luainterface

Automatically exported from code.google.com/p/luainterface
0 stars 0 forks source link

Can not set value in array unless its a double #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
See question at ask wireshark for full details:
http://ask.wireshark.org/questions/5885/convert-table-to-byte-array-using-clrpac
kage

Original issue reported on code.google.com by schoo...@gmail.com on 7 Sep 2011 at 1:26

GoogleCodeExporter commented 9 years ago
Let me know if you need any additional information that isnt included in the 
post given.

Original comment by schoo...@gmail.com on 7 Sep 2011 at 1:29

GoogleCodeExporter commented 9 years ago
I believe, that is not only restricted to setting an array. 

It seems, you can't call any function where the type needs to be boxed through 
an System.Object. For example:

public void foobar(object o) // must be a float
{
  // luainterface always boxes o as a System.Double, so it crashes here
  float f = (float)o; 
}

can this function be called from LuaInterface?

This heavily restricts the use of LuaInterface and reflection for me :(

Original comment by immanuel...@gmx.de on 21 Sep 2011 at 1:09