[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] question on C types
From: |
Joerg F. Wittenberger |
Subject: |
[Chicken-users] question on C types |
Date: |
24 Nov 2003 17:42:09 +0100 |
Hi,
somehow I can't understand the fine manual. I want to code some parts
in C and can't interface.
The idea is to have 'result' hold a reference to some memory, which is
going to be opaque to the scheme side. I don't need any type
checking, actually I don't want any. I tried:
(let ((result (##sys#allocate-vector size #f 0 #f)))
((foreign-lambda*
void
((c-pointer line) (integer size))
"int *p=line; int i; for(i=0; i<size; ++i) p[i]=i;")
result size)
result))
But I get:
Error: bad argument type - not a pointer: #(0 0)
So apparently I better use something else instead of
'##sys#allocate-vector' ??? And what will I have to do to get rid of
the type check eventually?
Thanks a lot
/Jörg
--
The worst of harm may often result from the best of intentions.
- [Chicken-users] question on C types,
Joerg F. Wittenberger <=