[CM] Fastest way to copy scheme variables into a shared buffer?

Elijah Stone elronnd at elronnd.net
Fri Jan 21 18:07:58 PST 2022


> I'm just wondering what the recommended way would be to store scheme 
> variables in some C memory, where the type and size is known on both 
> ends (or can be described in a notification from one to the other). Any 
> suggestions most appreciated!

If by 'scheme variable' you mean an actual scheme-level object, I do not 
think it is possible.  If you want a scheme-level wrapper for a 
(non-scheme) object which is shared, I would use a c object.  (I think 
there are some examples in snd.)  I use s7_c_type_set_ref to set up 
accessors (viz univeral applicative syntax), which is a bit nicer than 
putting them in the global namespace.

(And a question for Bil: any chance we can get more than a single word
  of data for c objects?  I know there is more space in s7_cell... :)

  -E


More information about the Cmdist mailing list