19 Dec 03:05
Re: Foreign C with pointers
John Vogel <jpvogel1 <at> gmail.com>
2007-12-19 02:05:03 GMT
2007-12-19 02:05:03 GMT
But, this definition is correct:
shiftMyIP :: MyIP -> MyIP
shiftMyIP ip = unsafePerformIO . alloca $ \ptr -> poke ptr ip >> peek (shiftIP ptr)
The other 2 definitions don't even compile. And since it works I'll try attaching the files.
You can also get the file here: http://vragon2.googlepages.com/example.zip
Just run the make file to build.
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users <at> haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RSS Feed