Re: [Mono-list] Unboxing values from embedded mono

2003-08-04 Thread Sam Clegg
On Mon, Aug 04, 2003 at 12:45:50PM +0200, Paolo Molaro wrote:
 We added it a while back: use mono_object_unbox() to get a pointer
 to the data:
 
   gint32 *int32p = mono_object_unbox (obj);
   gint32 value = *int32p;

Should this maybe be a macro?  Its a one line function right now
and I guess it gets called a lot.
-- 
sam clegg
:: [EMAIL PROTECTED] :: http://superduper.net/ :: PGP : D91EE369 
$superduper: .signature,v 1.13 2003/06/17 10:29:24 sam Exp $


pgp0.pgp
Description: PGP signature


[Mono-list] Unboxing values from embedded mono

2003-08-01 Thread Perry, James
Hi there,

I'm embedding Mono within a certain piece of software, and I'm looking at
extracting values out of return values (from functions called via
mono_runtime_invoke). The writeup on embedding mono seems to indicate that
there isn't an API to do this yet, although one is planned.

To be more complete, the functions being called will return a specific class
(or one of a set of specific classes) and I need to pull the values from
some primitive member variables (integers, bools, etc...). Basically, I'm
looking for something like mono_unbox_integer or something like that...

I've looked at mod_mono but from what I can tell it never actually looks at
any return values, instead relying on callbacks. While I could do this, I
think it would probably be somewhat ugly in this circumstance.

Can anybody recommend anything in particular to look at, or am I out of luck
(i.e., I get to write it myself:)?

Thanks,
James
***
This e-mail and any files transmitted with it are provided for convenience only
and is to be considered confidential and are intended solely for the use
of the individual to whom it is addressed.  If you have received this e-mail
in error please notify the sender immediately.

CBCL Limited assumes no responsibility for data supplied electronically by e-mail
and any unauthorized use or changes to such data is strictly prohibited.  CBCL
Limited maintains all rights and copyrights to e-mailed electronic files.