Thanks, that did the trick, I was able to ge things running when using: TypeReference r_type = module.Import(typeof(int)); ..now back to the original problem, do you think the steps in the code I posted would be a good start to approach this problem? Op vrijdag 15 maart 2013 15:27:11 UTC+1 schreef Jb Evain het volgende:
> Hey Martijn, > > Primitive are special beasts, you probably don't want to create them > manually. Use the module's TypeSystem instead. > > Jb > > On Wed, Mar 13, 2013 at 9:05 PM, <[email protected] <javascript:>> > wrote: > > I actually thought (hoped ;) it would be less tedious using Cecil; I'd > only > > have to write the parser once and be able to run it on any library in > > question? Also, I'd be able to take advantages of updates the original > > author does on the origninal lib, and run it through the replace > procedure > > again. > > > > I started doing some tests, but run into problems quickly: > > > > The Cecil replace code: > > http://pastebin.com/xpJ9qPZy > > > > And the test module in which I'm trying to replace floats with int's: > > http://pastebin.com/j3yVQCPb > > > > It seems to find all floats, but if I try to replace something (In the > > example I only try so for float method return types), it will cause my > test > > to thow a "not supported by the language".. Any ideas / suggestions? > > > > Thanks! > > > > Martijn > > > > > > On Monday, March 11, 2013 6:42:27 PM UTC+1, [email protected] wrote: > >> > >> Hi, > >> > >> Someone pointed me to cecil for a problem I've run into; > >> I'm using a fixedpoint class to make sure my calculations deliver > >> deterministic results across different platforms. Now I also want to > apply > >> this to a 3rdpart library I'm using, but this library is using floats, > which > >> I'd like to replace using the custom fixedpoint struct (which uses > operator > >> overloading for all operations). Is this possible using cecil and if > so, > >> does anyone have any pointers/tips to get me started? I guess I have to > >> replace all math functions like cos/sin/tan etc with respective > fixedpoint > >> ones too? > >> > >> Thanks! > >> > >> Martijn > > > > -- > > -- > > -- > > mono-cecil > > --- > > You received this message because you are subscribed to the Google > Groups > > "mono-cecil" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- -- -- mono-cecil --- You received this message because you are subscribed to the Google Groups "mono-cecil" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
