[MLton-user] ffi question

Vesa A Norrman MLton-user@mlton.org
Tue, 6 May 2003 15:13:50 +0300 (EET DST)


Hello, I was thinking to call XOpenDisplay from mlton. I wanted to
write someting like

val XOpenDisplay = _ffi "XOpenDisplay" : string -> pointer

but there is not a pointer type available according to documentation

u ::= bool | char | int | real | string | unit | word | word8

XOpenDisplay returns a pointer to a structure (Display), but applications
always treat this pointer opaque. An application only stores this pointer
and passes is to other functions. What is the best type? Another question:
is there a way (in ffi) to check if a pointer is 0. TIA Vesa
-- 
                                    /`---*\
                                   = ^ o ^ =
                                    `-----'


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-user mailing list
MLton-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-user