diff --git a/ginfo.c b/ginfo.c index fc265ad19..b2a7431c9 100644 --- a/ginfo.c +++ b/ginfo.c @@ -707,7 +707,7 @@ g_arg_info_may_be_null (GIArgInfo *info) GIBaseInfo *base = (GIBaseInfo *)info; ArgBlob *blob = (ArgBlob *)&base->typelib->data[base->offset]; - return blob->null_ok; + return blob->allow_none; } GITransfer diff --git a/girnode.c b/girnode.c index e6fc799d9..7b68e0c4d 100644 --- a/girnode.c +++ b/girnode.c @@ -1489,7 +1489,7 @@ g_ir_node_build_typelib (GIrNode *node, module, modules, strings, types, data, &signature, offset2); - blob2->may_return_null = function->result->null_ok; + blob2->may_return_null = function->result->allow_none; blob2->caller_owns_return_value = function->result->transfer; blob2->caller_owns_return_container = function->result->shallow_transfer; blob2->reserved = 0; @@ -1533,7 +1533,7 @@ g_ir_node_build_typelib (GIrNode *node, module, modules, strings, types, data, &signature, offset2); - blob2->may_return_null = function->result->null_ok; + blob2->may_return_null = function->result->allow_none; blob2->caller_owns_return_value = function->result->transfer; blob2->caller_owns_return_container = function->result->shallow_transfer; blob2->reserved = 0; @@ -1585,7 +1585,7 @@ g_ir_node_build_typelib (GIrNode *node, module, modules, strings, types, data, &signature, offset2); - blob2->may_return_null = signal->result->null_ok; + blob2->may_return_null = signal->result->allow_none; blob2->caller_owns_return_value = signal->result->transfer; blob2->caller_owns_return_container = signal->result->shallow_transfer; blob2->reserved = 0; @@ -1632,7 +1632,7 @@ g_ir_node_build_typelib (GIrNode *node, module, modules, strings, types, data, &signature, offset2); - blob2->may_return_null = vfunc->result->null_ok; + blob2->may_return_null = vfunc->result->allow_none; blob2->caller_owns_return_value = vfunc->result->transfer; blob2->caller_owns_return_container = vfunc->result->shallow_transfer; blob2->reserved = 0; @@ -1661,7 +1661,7 @@ g_ir_node_build_typelib (GIrNode *node, blob->in = param->in; blob->out = param->out; blob->dipper = param->dipper; - blob->null_ok = param->null_ok; + blob->allow_none = param->allow_none; blob->optional = param->optional; blob->transfer_ownership = param->transfer; blob->transfer_container_ownership = param->shallow_transfer; diff --git a/girnode.h b/girnode.h index 0ef95df72..b8161375d 100644 --- a/girnode.h +++ b/girnode.h @@ -136,7 +136,7 @@ struct _GIrNodeParam gboolean dipper; gboolean optional; gboolean retval; - gboolean null_ok; + gboolean allow_none; gboolean transfer; gboolean shallow_transfer; diff --git a/girparser.c b/girparser.c index fb5b68bee..9ca5225f4 100644 --- a/girparser.c +++ b/girparser.c @@ -699,7 +699,7 @@ start_parameter (GMarkupParseContext *context, const gchar *retval; const gchar *dipper; const gchar *optional; - const gchar *nullok; + const gchar *allow_none; const gchar *transfer; GIrNodeParam *param; @@ -712,7 +712,7 @@ start_parameter (GMarkupParseContext *context, retval = find_attribute ("retval", attribute_names, attribute_values); dipper = find_attribute ("dipper", attribute_names, attribute_values); optional = find_attribute ("optional", attribute_names, attribute_values); - nullok = find_attribute ("null-ok", attribute_names, attribute_values); + allow_none = find_attribute ("allow-none", attribute_names, attribute_values); transfer = find_attribute ("transfer-ownership", attribute_names, attribute_values); if (name == NULL) @@ -756,10 +756,10 @@ start_parameter (GMarkupParseContext *context, else param->optional = FALSE; - if (nullok && strcmp (nullok, "1") == 0) - param->null_ok = TRUE; + if (allow_none && strcmp (allow_none, "1") == 0) + param->allow_none = TRUE; else - param->null_ok = FALSE; + param->allow_none = FALSE; parse_param_transfer (param, transfer); diff --git a/girwriter.c b/girwriter.c index d4d550631..5a9459fd2 100644 --- a/girwriter.c +++ b/girwriter.c @@ -183,9 +183,9 @@ function_generate (GIdlWriter * writer, GIdlNodeFunction * node) g_string_append (markup_s, g_markup_printf_escaped (" transfer=\"full\"")); - if (param->null_ok) + if (param->allow_none) g_string_append (markup_s, - g_markup_printf_escaped (" null-ok=\"1\"")); + g_markup_printf_escaped (" allow-none=\"1\"")); if (strcmp (direction, "in") != 0) g_string_append (markup_s, diff --git a/gtypelib.h b/gtypelib.h index 8bb877779..3db620d97 100644 --- a/gtypelib.h +++ b/gtypelib.h @@ -127,7 +127,7 @@ typedef struct guint in : 1; guint out : 1; guint dipper : 1; - guint null_ok : 1; + guint allow_none : 1; guint optional : 1; guint transfer_ownership : 1; guint transfer_container_ownership : 1;