Thank a lot ! it works!
Lamine.
On 04/29/2014 03:52 PM, Sylvain Henry wrote:
To create the [String] as in your example, you just have to write:
let names = ["x"++ show i | i <- [0..w-1]]
varnames <- mallocList names
-Sylvain
2014-04-29 15:40 GMT+02:00 Lamine <mailto:mohama
tring b x 99
return b
pokeCString :: CString -> String -> Int -> IO ()
pokeCString dst value maxLen = withCStringLen (take maxLen value) $
uncurry (copyArray dst)
-Sylvain
2014-04-29 13:11 GMT+02:00 Lamine <mailto:mohamadoulam...@gmail.com>>:
Hi,
I want to do write t
I try pokeElemOff but i have same error "segmentation fault(core
dumped)". Thank for your response!
On 04/29/2014 01:30 PM, Henning Thielemann wrote:
Am 29.04.2014 13:11, schrieb Lamine:
I try this code unsing mallocList to (http://lpaste.net/report/712):
mallocList :: [CString]
urry (pokeByteOff p))
return p
let n = sizeOf(undefined :: CString)
allocaArray w $ \var -> do
xs <- peekArray (w*n) var
varnames <- mallocList xs
I have an error "segmentation fault(core dumped)".
can some