diff options
author | Garrett Regier <garrett.regier@riftio.com> | 2015-06-03 05:24:21 -0700 |
---|---|---|
committer | Garrett Regier <garrett.regier@riftio.com> | 2015-06-21 13:01:25 -0700 |
commit | 0aef39a20bd229170871edda862ade7d24ff7edd (patch) | |
tree | 417e9faa0edc487d577b5c3e04d6feaa369c8766 /girepository/girnode.c | |
parent | 5d47bb3a72e12150d7862d602d5032cf920c3543 (diff) | |
download | gobject-introspection-0aef39a20bd229170871edda862ade7d24ff7edd.tar.gz |
girepository: Support GError exceptions on callbacks
Generalize "throws" attribute to SignatureBlob which can be used by all
callable blob types. Keep FunctionBlob and VFuncBlob throw attributes
around and functional for compatibility. Refactor girwriter.c to write
out throws attribute for all callable types.
Based on a patch by Simon Feltman.
https://bugzilla.gnome.org/show_bug.cgi?id=729543
Diffstat (limited to 'girepository/girnode.c')
-rw-r--r-- | girepository/girnode.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/girepository/girnode.c b/girepository/girnode.c index a7a77e31..d0a18a31 100644 --- a/girepository/girnode.c +++ b/girepository/girnode.c @@ -1641,7 +1641,7 @@ _g_ir_node_build_typelib (GIrNode *node, blob->getter = function->is_getter; blob->constructor = function->is_constructor; blob->wraps_vfunc = function->wraps_vfunc; - blob->throws = function->throws; + blob->throws = function->throws; /* Deprecated. Also stored in SignatureBlob. */ blob->index = 0; blob->name = _g_ir_write_string (node->name, strings, data, offset2); blob->symbol = _g_ir_write_string (function->symbol, strings, data, offset2); @@ -1667,6 +1667,7 @@ _g_ir_node_build_typelib (GIrNode *node, blob2->instance_transfer_ownership = function->instance_transfer_full; blob2->reserved = 0; blob2->n_arguments = n; + blob2->throws = function->throws; signature += 4; @@ -1708,6 +1709,7 @@ _g_ir_node_build_typelib (GIrNode *node, blob2->caller_owns_return_container = function->result->shallow_transfer; blob2->reserved = 0; blob2->n_arguments = n; + blob2->throws = function->throws; signature += 4; @@ -1797,7 +1799,7 @@ _g_ir_node_build_typelib (GIrNode *node, blob->must_be_implemented = 0; /* FIXME */ blob->must_not_be_implemented = 0; /* FIXME */ blob->class_closure = 0; /* FIXME */ - blob->throws = vfunc->throws; + blob->throws = vfunc->throws; /* Deprecated. Also stored in SignatureBlob. */ blob->reserved = 0; if (vfunc->invoker) @@ -1825,6 +1827,7 @@ _g_ir_node_build_typelib (GIrNode *node, blob2->instance_transfer_ownership = vfunc->instance_transfer_full; blob2->reserved = 0; blob2->n_arguments = n; + blob2->throws = vfunc->throws; signature += 4; |