In local.glasgow-haskell-users, you wrote:
Christian Maeder wrote:
What is ctype.h good for?
A good question. Its only use seems to be in
ghc/rts/RtsFlags.c where it is used for functions
like isdigit and isspace for decoding the RTS flags.
Maybe it should be retired altogether.
I'm
Christian Maeder wrote:
[EMAIL PROTECTED] - rpm -q gcc
gcc-3.3.3-41
make (in ghc-6.2.1) fails (in ghc/GC.c) with:
GC.c: In function `threadLazyBlackHole':
GC.c:4049: warning: use of cast expressions as lvalues is deprecated
make[2]: *** [GC.o] Fehler 1
The actual error not messed up by warnings
Volker Stolz wrote:
What is ctype.h good for?
A good question. Its only use seems to be in
ghc/rts/RtsFlags.c where it is used for functions
like isdigit and isspace for decoding the RTS flags.
Maybe it should be retired altogether.
I'm rather puzzled how this works if ctype.h
Volker Stolz wrote (snipped):
The functions are C89, so they should be present *somewhere* in libc
anywhere.
Yes, you're right. Normally isspace and friends are used as macros,
but ANSI C requires them to be also available as functions so they
must be exported that way.
Therefore if you don't
Christian Maeder wrote:
The actual error not messed up by warnings is:
../../ghc/compiler/ghc-inplace -optc-O -optc-w -optc-Wall -optc-W
-optc-Wstrict-prototypes -optc-Wmissing-prototypes
-optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return
-optc-Wbad-function-cast
Hi all,
I would like to attach finalizer (written in Haskell) to some pointer.
When the pointer won't be needed any more, finalizer should run. So here
is the code:
module Main where
import Foreign.Ptr
import Foreign.ForeignPtr
import Foreign.Marshal.Alloc
foreign import stdcall wrapper mkFin
HI Gracjan,
I would like to attach finalizer (written in Haskell) to some pointer.
When the pointer won't be needed any more, finalizer should run. So
here is the code:
import Foreign.ForeignPtr
I couldn't get finalisers to work either with the newForeignPtr from
this module. I didn't know how
I wrote:
since version 6.2 we have 2 binary distributions for (generic) linux:
for glibc 2.2 and glibc 2.3
Maybe this is no longer necessary. I've produced an installation (under
glibc 2.2) that runs under glibc 2.2 and glibc 2.3.
I've now also successfully installed ghc-6.2.1 from source under
import Foreign.ForeignPtr
I couldn't get finalisers to work either with the newForeignPtr from
this module. I didn't know how to create a proper FunPtr.
You create a FunPtr using foreign import:
foreign import ccall malloc.h free free_ptr :: FunPtr (Ptr a - IO ())
In Foreign.Concurrent
I was curious what the best way would be to access the various useful
GMP functions which are not exported for Integers. I was thinking of
making my own (strict) Integer type, but it would be much easier if I
can just use the FFI to import the required functions and get at the
mpz_t inside
(lengthy)
Hey,
In the hs-plugins library I'm using Data.Dynamic to provide runtime type
checking of plugin values when they are loaded. There is a problem,
however: when using fromDyn/fromDynamic to check the type of the
plugin's value against the type the application loading the plugin
expects,
11 matches
Mail list logo