[fetter-devel] generating bindings for librrd

Anurag gnurag at gmail.com
Thu Sep 20 10:53:34 UTC 2007


On 9/19/07, Lynbech Christian <christian.lynbech at tietoenator.com> wrote:
> This looks like a problem with derived types that I have been battling
> with the last time I tried to use Verranzano (which is like a year back
> so things may have changed).

Hi!

You are right, things have changed a lot in the cffi's darcs
repository. As per Attila's suggestion i used the latest version of
CFFI from the darcs tree, and the issue with OFF-T seems to be solved.

Now, when i am calling any foreign function which does not require any
parameter, it returns me proper string output (for example calling a
function which returns version of library)

But the foreign function doesnt seem to do work when i use normal lisp strings.

(rrd-last "/path/to/test.rrd" 1)

gives me,

The value "/path/to/test.rrd"  is not of type
(SIGNED-BYTE 32)


I understand that i should use,
(cffi:with-foreign-string (rrdfile "/path/to/test.rrd")
    (rrd-last rrdfile 1))

i still get,
The value #.(SB-SYS:INT-SAP #X08185508) is not of type (SIGNED-BYTE 32).
   [Condition of type TYPE-ERROR]


Is there something i can do to convert the string to 32byte signed type?

Anurag

-- 
Anurag <0xB20A82C1>



More information about the fetter-devel mailing list