diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-06-02 19:36:59 +0200 |
---|---|---|
committer | Tomeu Vizoso <tomeu.vizoso@collabora.co.uk> | 2010-06-02 19:36:59 +0200 |
commit | b7804cc7114657f367f6371ddfe9805dad8c67ff (patch) | |
tree | 9e7169a9f339ba2fcf0f4530134bae8bbd705dc4 /girepository | |
parent | 2cdd4e9a3eb7944eb8cfeed17eb50185fc7623d1 (diff) | |
download | gobject-introspection-b7804cc7114657f367f6371ddfe9805dad8c67ff.tar.gz |
Fix marshalling of GStrv.GOBJECT_INTROSPECTION_0_6_13
* gir/gimarshallingtests.[hc]: Add a test for GStrv in function args and
as struct fields.
* girepository/giroffsets.c: Correctly compute the size of structs with
array fields
* girepository/girparser.c: Set is_pointer to FALSE for arrays with
fixed size that are inside structs.
* giscanner/glibtransformer.py: Special case GStrv as arrays of utf8.
* giscanner/annotationparser.py: Make full transfer the default for
arrays of char* returned by functions.
https://bugzilla.gnome.org/show_bug.cgi?id=620170
Diffstat (limited to 'girepository')
-rw-r--r-- | girepository/giroffsets.c | 10 | ||||
-rw-r--r-- | girepository/girparser.c | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c index 7a5e7011..263665ce 100644 --- a/girepository/giroffsets.c +++ b/girepository/giroffsets.c @@ -232,7 +232,11 @@ get_type_size_alignment (GIrNodeType *type, { ffi_type *type_ffi; - if (type->tag == GI_TYPE_TAG_ARRAY) + if (type->is_pointer) + { + type_ffi = &ffi_type_pointer; + } + else if (type->tag == GI_TYPE_TAG_ARRAY) { gint elt_size, elt_alignment; @@ -250,10 +254,6 @@ get_type_size_alignment (GIrNodeType *type, return TRUE; } - else if (type->is_pointer) - { - type_ffi = &ffi_type_pointer; - } else { if (type->tag == GI_TYPE_TAG_INTERFACE) diff --git a/girepository/girparser.c b/girepository/girparser.c index 5861c167..678482c5 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -1745,6 +1745,9 @@ start_type (GMarkupParseContext *context, else /* If neither zero-terminated nor length nor fixed-size is given, assume zero-terminated. */ typenode->zero_terminated = !(typenode->has_length || typenode->has_size); + + if (typenode->has_size && ctx->current_typed->type == G_IR_NODE_FIELD) + typenode->is_pointer = FALSE; } else { typenode->zero_terminated = FALSE; typenode->has_length = FALSE; |