Re: [Vala] support for Python C API
- From: Arc Riley <arcriley gmail com>
- To: pancake <pancake youterm com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] support for Python C API
- Date: Sat, 19 Jun 2010 08:12:10 -0400
What does it not support, then, out of the PyType slots:
- tp_name - can the name be set manually, or must it mimic the Vala name
- tp_print
- tp_repr - this is extremely important for frameworks
- tp_as_number
- tp_as_sequence
- tp_as_mapping
- tp_hash
- tp_call
- tp_str
- tp_getattro
- tp_setattro
- tp_as_buffer
- tp_flags
- tp_doc - essential - does this copy valadoc or have another method to
set it
- tp_clear
- tp_richcompare
- tp_weaklistoffset
- tp_iter
- tp_iternext
- tp_methods
- tp_members
- tp_getset
- tp_base - can it be subclassed
- tp_dict
- tp_descr_get
- tp_descr_set
- tp_dictoffset
- tp_init
- tp_alloc
- tp_new
- tp_free
- tp_bases
- tp_subclasses
- tp_weaklist
Some of these are redundant or depreciated in use, but a vast majority of
them are essential.
Does it convert to bytes/unicode properly? Does it check the type being
passed to ensure the resulting bindings cannot be segfaulted by pure Python
code? Does it map libgee to these datatypes or what is the method used to
pass container objects between GObject code and Python?
Most importantly, where are the docs, or at least example code showing
that/how these things work?
On Sat, Jun 19, 2010 at 7:41 AM, pancake <pancake youterm com> wrote:
Valaswig does the wrap for all this stuff. Well not all, but most of it.
On Jun 19, 2010, at 1:03 PM, Arc Riley <arcriley gmail com> wrote:
SWIG is not writing your own bindings and, in my experience, does not
result in a very Pythonic API.
Unless SWIG has substantially matured, to the extent of being able to
specify functions to support sequence, mapping, iteration, etc in the PyType
definition, its an inadequate solution.
On Sat, Jun 19, 2010 at 6:31 AM, pancake < <pancake youterm com>
pancake youterm com> wrote:
You can use valaswig.
On Jun 19, 2010, at 5:57 AM, Celil < <celil kj gmail com>
celil kj gmail com> wrote:
I am writing Python bindings to a library that is written in Vala.
Currently, I need to output the header files, and write the bindings in
C. However, tt would be very nice if it was possible to write then in
Vala.
Is anybody writing a vala vapi for "Python.h"? It would be pretty sweet
to be able to write python extensions in vala.
Celil
_______________________________________________
vala-list mailing list
<vala-list gnome org>vala-list gnome org
<http://mail.gnome.org/mailman/listinfo/vala-list>
http://mail.gnome.org/mailman/listinfo/vala-list
_______________________________________________
vala-list mailing list
<vala-list gnome org>vala-list gnome org
<http://mail.gnome.org/mailman/listinfo/vala-list>
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]