gi repository and C array
- From: PICCA Frédéric-Emmanuel <frederic-emmanuel picca synchrotron-soleil fr>
- To: "python-hackers-list gnome org" <python-hackers-list gnome org>
- Subject: gi repository and C array
- Date: Sat, 15 Oct 2011 11:14:35 +0000
Hello
I have a C library and I try to use the gobject introspection from python
now the structure I am trying to bing is like this
struct _HklVector {
double data[3];
};
the gir file contain this
<record name="Vector"
c:type="HklVector"
glib:type-name="HklVector"
glib:get-type="hkl_vector_get_type"
c:symbol-prefix="vector">
<field name="data" writable="1">
<array zero-terminated="0" c:type="gdouble" fixed-size="3">
<type name="gdouble" c:type="double"/>
</array>
</field>
but when I try to access my structure from python
I got this
from gi.repository import Hkl
v = Hkl.Vector()
print v.data
[]
so my question is why the python binding do not print
[0.0, 0.0, 0.0]
thanks for your help
Frederic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]