Re: [Vala] support for Python C API



Valaswig is under development. It works for simple stuff like iterators, generics, classes, structs and other 
stuff.

It parses a vapi file and generates a swig interface file. There's valaswig-cc command to directly compile 
the .so for ruby, python, python, perl and lua.



----- Original message -----
What does it not support, then, out of the PyType slots:

thats up to swig. Not valaswig. You can send patches to swig. But python is the most supported lang in swig.

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?  

Yep. It checks for types. Dunno about unicode. But bytes and strings are handled as char*, so it works. Utf 
is char* compatible..but didnt really checked if it works.

Does it map libgee to these datatypes or what is the
method used to pass container objects between GObject code and Python?

I just use it to bind r2 api iterators. But you can try if it works for libgee. It should. Generics are 
working as is. The only problem is that if you want generics support you have to use the c++ mode because 
swig only have generics support for c++. But i use it as a wrapper for glib-like iterators and it works.

Most importantly, where are the docs, or at least example code showing
that/how these things work?


nope. There are no docs. But there's many example codes and test programs in the radare2 hg repo (check swig/ 
dir inside)

i can try to document valaswig for the next release..if you find any issue.please report it. I was planning 
to release 0.2 next month together with r2-0.5.

--pancake


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]