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" <[EMAIL PROTECTED]> writes:

> On 8/3/07, Ivan Raikov <[EMAIL PROTECTED]> 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 mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to