nlffi cvt vs get

brian <briand-/[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
I went back to the "no longer foreign" paper and found the following  
snippet of example code:

fun maxx l = let
   fun x l =
     C.Cvt.ml_double
      (C.Get.double
        (IXDB.S_record.f_x
          (C.Ptr.|*| l)))

The idea being that C.Cvt creates and ML object to avoid any nasty  
interaction with malloc/free on the part of the pointer l.

The problem is that I have basically re-created this code and cannot  
get this to work.

The C.Get.double call returns a type which is incompatible with  
C.Cvt.ml_double

Shouldn' it work ?

If I look at C.sig it looks to be that the types _are_ compatible.

???

Brian


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.