[ocaml-ctypes] Setting completion function variable for Readline
Phil Hagelberg
phil at hagelb.org
Tue Sep 24 04:45:34 BST 2013
Jeremy Yallop writes:
> Yes: you can use the foreign_value function[0] to retrieve the address
> of the global, and then set it directly using the assignment operator
> <- at .
Thanks; that looks like just the trick.
There's one twist which still has me stumped though. For custom
completion functions, Readline requires an array be returned which is
null-terminated. As far as I can tell, it's impossible to represent this
within the OCaml type system. Is this something I'd have to dip into the
Obj module to implement? What would that look like?
-Phil Hagelberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.ocaml.org/pipermail/ctypes/attachments/20130923/740d6d44/attachment.sig>
More information about the Ctypes
mailing list