> On 30 Dec 2016, at 03:34, btif...@vivaldi.net wrote:
> 
> Jafar, Clinton;  I need a little education on the new mkExternal feature in 
> icall.h, as I could not get a working sample. Currently, pointer data is just 
> sent back as an integer handle (which will break on some platforms), and I'd 
> like to extend the supported types to C structs and pointers to memory 
> blocks, etc.  I hope that just a short working example on what the actual C 
> data type declaration is to start running with it; could not tell from the 
> macro, so I thought I'd just ask instead of flailing about.

I’m guessing we’re talking about revision 4642 here.  If so, the “guilty party” 
is me.  The intention is that an external value is an opaque type: something 
that is generated by the C code, passed into the Unicon code and given back as 
required.  The Unicon code should not manipulate it or poke around inside it 
—it’s supposed to be opaque — just give it back to the C code when needed.

A good example of it’s use (which will be coming to a distribution near you 
fairly soon, I hope) is the way that RFC6234 handles the secure hash context.  
The context, which is created by the routines, is passed back to the caller, 
which gives it back to the hash routine for each subsequent operation.

I hope that makes things a bit clearer. Sorry for the confusion, but the RF6234 
code, which would have provided an example of how to use mkExternal, is still 
in the works, awaiting some changes to how things are organised.

Regards

Don
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to