[clean-list] Fake "cycle in spine detected" when using *World
from C module
John van Groningen
johnvg at cs.ru.nl
Wed Jul 1 14:54:27 MEST 2009
Vag wrote:
>..
>------------------------------
>c_stdio_intf.h
>------------------------------
>
>Clean( :: *FILE :== *Int )
>
>void xopen(int* f);
>Clean( xopen :: *World -> (*FILE,*World) )
>
>void xclose(int);
>Clean( xclose :: *FILE *World -> *World )
>..
The code generated by htoclean for xclose is not correct. The update of
the result is missing after the call to c. This will happen for all
functions that yield just the World, but not if the result is a tuple
containing the World.
You can download a fixed htoclean.exe at:
http://clean.cs.ru.nl/download/Clean22/windows/htoclean.7z
Or instead, you could fix the generated interface by adding:
fill_a 0 1
pop_a 1
after the ccall for xclose in the generated .icl file.
Kind regards,
John van Groningen
More information about the clean-list
mailing list