[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Question about easyffi
From: |
Ivan Raikov |
Subject: |
Re: [Chicken-users] Question about easyffi |
Date: |
Mon, 06 Aug 2007 09:56:28 +0900 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Okay, so I have the following code:
;; Embed, but do not parse
#>
#include <Python.h>
<#
;; Parse & embed
#>!
___declare(type, "pyobject;\"PyObject\";py-object-to;py-object-from")
PyObject *PyObject_CallObject (PyObject *, PyObject *);
<#
;; Scheme -> Python
(define (py-object-to value)
....
;; Python -> Scheme
(define (py-object-from value)
....
It compiles, but when I actually try to evaluate this:
(PyObject_CallObject func (list->vector (list)))
I get an exception:
Error: bad argument type - not a pointer: #()
What am I doing wrong here?
-Ivan
"felix winkelmann" <address@hidden> writes:
> On 8/3/07, Ivan Raikov <address@hidden> wrote:
>>
>> PyObject *PyObject_CallObject (PyObject *, PyObject *);
>>
>> I would like to specify Scheme procedures that take a PyObject
>> pointer, and convert that to a Scheme value, and vice versa.
>
> "___declare(type, ...)" should provide what you need (see the easyffi
> wiki page - it's somewhat buried in there).
>
- [Chicken-users] Question about easyffi, Ivan Raikov, 2007/08/03
- Re: [Chicken-users] Question about easyffi, felix winkelmann, 2007/08/03
- Re: [Chicken-users] Question about easyffi,
Ivan Raikov <=
- Re: [Chicken-users] Question about easyffi, felix winkelmann, 2007/08/06
- Re: [Chicken-users] Question about easyffi, Ivan Raikov, 2007/08/06
- Re: [Chicken-users] Question about easyffi, felix winkelmann, 2007/08/06
- Re: [Chicken-users] Question about easyffi, Ivan Raikov, 2007/08/06
- Re: [Chicken-users] Question about easyffi, felix winkelmann, 2007/08/06
- Re: [Chicken-users] Question about easyffi, Ivan Raikov, 2007/08/06
- Re: [Chicken-users] Question about easyffi, felix winkelmann, 2007/08/06
- [Chicken-users] Problem with sqlite3 egg, Alejandro Forero Cuervo, 2007/08/08
- [Chicken-users] Re: Problem with sqlite3 egg, Thomas Christian Chust, 2007/08/09
- [Chicken-users] Re: Problem with sqlite3 egg, Alejandro Forero Cuervo, 2007/08/10