[MLton-devel] runtime convention

Matthew Fluet fluet@CS.Cornell.EDU
Wed, 4 Dec 2002 20:28:50 -0500 (EST)


Is there a standard convention for dealing with an ML function that takes
a string option as a veneer for a runtime C/Posix function that takes a
possibly NULL char*?  This would seem to be a common C idiom, but I don't
recall running across an example of this when I was working on basis-2002.

The NetServDB.getBy{Name,Port} functions are like this.  For now, I do a
case on the string option in ML and dispatch to one of two _ffi functions,
one that takes a string and the other that has the NULL.  (See
runtime/basis/Net/NetServDB.c).



-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET 
comprehensive development tool, built to increase your 
productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel