[MLton-devel] RE: calling SML from C in MLton
Stephen Weeks
MLton@mlton.org
Wed, 30 Apr 2003 20:52:55 -0700
> Looking at the downloads I don't see a Cygwin version, and I can't guarantee
> how well I'll go building from source - if you have one available please put
> it up.
I just built 20030419 for Cygwin and uploaded it.
> I tried building the new experimental MLTON from source under Cygwin with
> the last standard release:
>
> MLton 20030312 (built Wed Mar 12 12:55:40 2003 on CYGWIN)
>
> but got a crash in mllex:
...
> $ mllex
> Segmentation fault (core dumped)
Hmmm. mllex works fine on the version of Cygwin I use (dll 1.3.19).
I tried it with no args and via making mlton. Let me know what you
see with 20030419. I'm not sure how to track this bug down. Can you
strace mllex so I can see how far it's getting?
What's strange is that mlton and mlyacc seem to work for you, and they
were built with exactly the same compiler and in the same way as
mllex.
One thing to check -- can you make sure it's the right version of
mllex. On my machine, I see
% ll /bin/mllex
-rwxr-xr-x 1 sweeks None 229376 Mar 12 12:56 /bin/mllex
> On the topic of the FFI, is it possible to set use reference variables to
> pass results back from SML callbacks to the C side?
The easiest way to pass results back that I can think of is to use
_ffi to import into SML a C function that takes as arguments all the
results and stores them in some C globals. Just like passing
arguments from C to SML it's ugly, and we'll add better support to
MLton for it someday.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel