[perl-Glib-Object-Introspection] Harmonize indentation
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Harmonize indentation
- Date: Wed, 23 Jan 2013 20:26:48 +0000 (UTC)
commit 5efd13e364d4e431651b770ef12fa9889cf4ef39
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Mon Jan 21 00:45:43 2013 +0100
Harmonize indentation
gperl-i11n-field.c | 20 +++---
gperl-i11n-info.c | 8 +-
gperl-i11n-marshal-arg.c | 6 +-
gperl-i11n-marshal-array.c | 20 +++---
gperl-i11n-marshal-hash.c | 123 ++++++++++++++++++++--------------------
gperl-i11n-marshal-interface.c | 2 +-
gperl-i11n-marshal-list.c | 4 +-
gperl-i11n-method.c | 2 +-
gperl-i11n-size.c | 12 ++--
9 files changed, 98 insertions(+), 99 deletions(-)
---
diff --git a/gperl-i11n-field.c b/gperl-i11n-field.c
index f991dbb..7174599 100644
--- a/gperl-i11n-field.c
+++ b/gperl-i11n-field.c
@@ -29,16 +29,16 @@ store_fields (HV *fields, GIBaseInfo *info, GIInfoType info_type)
case GI_INFO_TYPE_UNION:
{
- gint n_fields = g_union_info_get_n_fields ((GIUnionInfo *) info);
- for (i = 0; i < n_fields; i++) {
- GIFieldInfo *field_info;
- const gchar *field_name;
- field_info = g_union_info_get_field ((GIUnionInfo *) info, i);
- field_name = g_base_info_get_name ((GIBaseInfo *) field_info);
- av_push (av, newSVpv (field_name, PL_na));
- g_base_info_unref ((GIBaseInfo *) field_info);
- }
- break;
+ gint n_fields = g_union_info_get_n_fields ((GIUnionInfo *) info);
+ for (i = 0; i < n_fields; i++) {
+ GIFieldInfo *field_info;
+ const gchar *field_name;
+ field_info = g_union_info_get_field ((GIUnionInfo *) info, i);
+ field_name = g_base_info_get_name ((GIBaseInfo *) field_info);
+ av_push (av, newSVpv (field_name, PL_na));
+ g_base_info_unref ((GIBaseInfo *) field_info);
+ }
+ break;
}
default:
diff --git a/gperl-i11n-info.c b/gperl-i11n-info.c
index a5fc14a..3fc26a2 100644
--- a/gperl-i11n-info.c
+++ b/gperl-i11n-info.c
@@ -35,10 +35,10 @@ get_function_info (GIRepository *repository,
method);
break;
case GI_INFO_TYPE_UNION:
- function_info = g_union_info_find_method (
- (GIUnionInfo *) namespace_info,
- method);
- break;
+ function_info = g_union_info_find_method (
+ (GIUnionInfo *) namespace_info,
+ method);
+ break;
default:
ccroak ("Base info for namespace %s has incorrect type",
namespace);
diff --git a/gperl-i11n-marshal-arg.c b/gperl-i11n-marshal-arg.c
index b24f547..a67ea70 100644
--- a/gperl-i11n-marshal-arg.c
+++ b/gperl-i11n-marshal-arg.c
@@ -88,7 +88,7 @@ sv_to_arg (SV * sv,
break;
case GI_TYPE_TAG_ARRAY:
- arg->v_pointer = sv_to_array (transfer, type_info, sv, invocation_info);
+ arg->v_pointer = sv_to_array (transfer, type_info, sv, invocation_info);
break;
case GI_TYPE_TAG_INTERFACE:
@@ -103,7 +103,7 @@ sv_to_arg (SV * sv,
break;
case GI_TYPE_TAG_GHASH:
- arg->v_pointer = sv_to_ghash (transfer, type_info, sv);
+ arg->v_pointer = sv_to_ghash (transfer, type_info, sv);
break;
case GI_TYPE_TAG_ERROR:
@@ -218,7 +218,7 @@ arg_to_sv (GIArgument * arg,
return glist_to_sv (info, arg->v_pointer, transfer);
case GI_TYPE_TAG_GHASH:
- return ghash_to_sv (info, arg->v_pointer, transfer);
+ return ghash_to_sv (info, arg->v_pointer, transfer);
case GI_TYPE_TAG_ERROR:
ccroak ("FIXME - GI_TYPE_TAG_ERROR");
diff --git a/gperl-i11n-marshal-array.c b/gperl-i11n-marshal-array.c
index b95ae33..77f1202 100644
--- a/gperl-i11n-marshal-array.c
+++ b/gperl-i11n-marshal-array.c
@@ -40,13 +40,13 @@ array_to_sv (GITypeInfo *info,
if (is_zero_terminated) {
length = g_strv_length (pointer);
} else {
- length = g_type_info_get_array_fixed_size (info);
- if (length < 0) {
+ length = g_type_info_get_array_fixed_size (info);
+ if (length < 0) {
guint length_pos = g_type_info_get_array_length (info);
g_assert (iinfo && iinfo->aux_args);
/* FIXME: Is it OK to always use v_size here? */
length = iinfo->aux_args[length_pos].v_size;
- }
+ }
}
if (length < 0) {
@@ -120,9 +120,9 @@ sv_to_array (GITransfer transfer,
av = (AV *) SvRV (sv);
- item_transfer = transfer == GI_TRANSFER_CONTAINER
- ? GI_TRANSFER_NOTHING
- : transfer;
+ item_transfer = transfer == GI_TRANSFER_CONTAINER
+ ? GI_TRANSFER_NOTHING
+ : transfer;
param_info = g_type_info_get_param_type (type_info, 0);
param_tag = g_type_info_get_tag (param_info);
@@ -131,10 +131,10 @@ sv_to_array (GITransfer transfer,
g_type_tag_to_string (g_type_info_get_tag (param_info)),
transfer);
- is_zero_terminated = g_type_info_is_zero_terminated (type_info);
- item_size = size_of_type_info (param_info);
+ is_zero_terminated = g_type_info_is_zero_terminated (type_info);
+ item_size = size_of_type_info (param_info);
length = av_len (av) + 1;
- array = g_array_sized_new (is_zero_terminated, FALSE, item_size, length);
+ array = g_array_sized_new (is_zero_terminated, FALSE, item_size, length);
/* Arrays containing non-basic types as non-pointers need to be treated
* specially. Prime example: GValue *values = g_new0 (GValue, n);
@@ -155,7 +155,7 @@ sv_to_array (GITransfer transfer,
sv_to_arg (*svp, &arg, NULL, param_info,
item_transfer, TRUE, NULL);
- if (need_struct_value_semantics) {
+ if (need_struct_value_semantics) {
/* Copy from the memory area pointed to by
* arg.v_pointer. */
g_array_insert_vals (array, i, arg.v_pointer, 1);
diff --git a/gperl-i11n-marshal-hash.c b/gperl-i11n-marshal-hash.c
index cb940fc..f8f0c47 100644
--- a/gperl-i11n-marshal-hash.c
+++ b/gperl-i11n-marshal-hash.c
@@ -9,9 +9,9 @@ ghash_to_sv (GITypeInfo *info,
{
GITypeInfo *key_param_info, *value_param_info;
#ifdef NOISY
- GITypeTag key_type_tag, value_type_tag;
+ GITypeTag key_type_tag, value_type_tag;
#endif
- gpointer key_p, value_p;
+ gpointer key_p, value_p;
GITransfer item_transfer;
GHashTableIter iter;
HV *hv;
@@ -21,30 +21,30 @@ ghash_to_sv (GITypeInfo *info,
}
item_transfer = transfer == GI_TRANSFER_EVERYTHING
- ? GI_TRANSFER_EVERYTHING
- : GI_TRANSFER_NOTHING;
+ ? GI_TRANSFER_EVERYTHING
+ : GI_TRANSFER_NOTHING;
key_param_info = g_type_info_get_param_type (info, 0);
- value_param_info = g_type_info_get_param_type (info, 1);
+ value_param_info = g_type_info_get_param_type (info, 1);
#ifdef NOISY
- key_type_tag = g_type_info_get_tag (key_param_info);
- value_type_tag = g_type_info_get_tag (value_param_info);
+ key_type_tag = g_type_info_get_tag (key_param_info);
+ value_type_tag = g_type_info_get_tag (value_param_info);
#endif
dwarn (" GHashTable: pointer %p\n"
- " key type tag %d (%s)\n"
- " value type tag %d (%s)\n",
+ " key type tag %d (%s)\n"
+ " value type tag %d (%s)\n",
pointer,
key_type_tag, g_type_tag_to_string (key_type_tag),
value_type_tag, g_type_tag_to_string (value_type_tag));
hv = newHV ();
- g_hash_table_iter_init (&iter, pointer);
- while (g_hash_table_iter_next (&iter, &key_p, &value_p)) {
+ g_hash_table_iter_init (&iter, pointer);
+ while (g_hash_table_iter_next (&iter, &key_p, &value_p)) {
GIArgument arg = { 0, };
- SV *key_sv, *value_sv;
+ SV *key_sv, *value_sv;
dwarn (" converting key pointer %p\n", key_p);
arg.v_pointer = key_p;
@@ -52,17 +52,17 @@ ghash_to_sv (GITypeInfo *info,
if (key_sv == NULL)
break;
- dwarn (" converting value pointer %p\n", value_p);
- arg.v_pointer = value_p;
- value_sv = arg_to_sv (&arg, value_param_info, item_transfer, NULL);
- if (value_sv == NULL)
- break;
+ dwarn (" converting value pointer %p\n", value_p);
+ arg.v_pointer = value_p;
+ value_sv = arg_to_sv (&arg, value_param_info, item_transfer, NULL);
+ if (value_sv == NULL)
+ break;
- (void) hv_store_ent (hv, key_sv, value_sv, 0);
+ (void) hv_store_ent (hv, key_sv, value_sv, 0);
}
g_base_info_unref ((GIBaseInfo *) key_param_info);
- g_base_info_unref ((GIBaseInfo *) value_param_info);
+ g_base_info_unref ((GIBaseInfo *) value_param_info);
return newRV_noinc ((SV *) hv);
}
@@ -73,14 +73,14 @@ sv_to_ghash (GITransfer transfer,
SV *sv)
{
HV *hv;
- HE *he;
+ HE *he;
GITransfer item_transfer;
gpointer hash;
GITypeInfo *key_param_info, *value_param_info;
- GITypeTag key_type_tag;
- GHashFunc hash_func;
- GEqualFunc equal_func;
- I32 n_keys;
+ GITypeTag key_type_tag;
+ GHashFunc hash_func;
+ GEqualFunc equal_func;
+ I32 n_keys;
dwarn ("%s: sv %p\n", G_STRFUNC, sv);
@@ -106,28 +106,27 @@ sv_to_ghash (GITransfer transfer,
}
key_param_info = g_type_info_get_param_type (type_info, 0);
- value_param_info = g_type_info_get_param_type (type_info, 1);
+ value_param_info = g_type_info_get_param_type (type_info, 1);
- key_type_tag = g_type_info_get_tag (key_param_info);
+ key_type_tag = g_type_info_get_tag (key_param_info);
- switch (key_type_tag)
- {
- case GI_TYPE_TAG_FILENAME:
- case GI_TYPE_TAG_UTF8:
- hash_func = g_str_hash;
- equal_func = g_str_equal;
- break;
+ switch (key_type_tag) {
+ case GI_TYPE_TAG_FILENAME:
+ case GI_TYPE_TAG_UTF8:
+ hash_func = g_str_hash;
+ equal_func = g_str_equal;
+ break;
- default:
- hash_func = NULL;
- equal_func = NULL;
- break;
- }
+ default:
+ hash_func = NULL;
+ equal_func = NULL;
+ break;
+ }
dwarn (" GHashTable with transfer %d\n"
- " key_param_info %p with type tag %d (%s)\n"
- " value_param_info %p with type tag %d (%s)\n",
- transfer,
+ " key_param_info %p with type tag %d (%s)\n"
+ " value_param_info %p with type tag %d (%s)\n",
+ transfer,
key_param_info,
g_type_info_get_tag (key_param_info),
g_type_tag_to_string (g_type_info_get_tag (key_param_info)),
@@ -135,44 +134,44 @@ sv_to_ghash (GITransfer transfer,
g_type_info_get_tag (value_param_info),
g_type_tag_to_string (g_type_info_get_tag (value_param_info)));
- hash = g_hash_table_new (hash_func, equal_func);
+ hash = g_hash_table_new (hash_func, equal_func);
- n_keys = hv_iterinit (hv);
- if (n_keys == 0)
- goto out;
+ n_keys = hv_iterinit (hv);
+ if (n_keys == 0)
+ goto out;
- while ((he = hv_iternext (hv)) != NULL) {
- SV *sv;
- GIArgument arg = { 0, };
- gpointer key_p, value_p;
+ while ((he = hv_iternext (hv)) != NULL) {
+ SV *sv;
+ GIArgument arg = { 0, };
+ gpointer key_p, value_p;
- key_p = value_p = NULL;
+ key_p = value_p = NULL;
- sv = hv_iterkeysv (he);
+ sv = hv_iterkeysv (he);
if (sv && gperl_sv_is_defined (sv)) {
dwarn (" converting key SV %p\n", sv);
/* FIXME: Is it OK to always allow undef here? */
sv_to_arg (sv, &arg, NULL, key_param_info,
item_transfer, TRUE, NULL);
- key_p = arg.v_pointer;
+ key_p = arg.v_pointer;
}
- sv = hv_iterval (hv, he);
- if (sv && gperl_sv_is_defined (sv)) {
- dwarn (" converting value SV %p\n", sv);
- sv_to_arg (sv, &arg, NULL, key_param_info,
- item_transfer, TRUE, NULL);
- value_p = arg.v_pointer;
- }
+ sv = hv_iterval (hv, he);
+ if (sv && gperl_sv_is_defined (sv)) {
+ dwarn (" converting value SV %p\n", sv);
+ sv_to_arg (sv, &arg, NULL, key_param_info,
+ item_transfer, TRUE, NULL);
+ value_p = arg.v_pointer;
+ }
- if (key_p != NULL && value_p != NULL)
- g_hash_table_insert (hash, key_p, value_p);
+ if (key_p != NULL && value_p != NULL)
+ g_hash_table_insert (hash, key_p, value_p);
}
out:
dwarn (" -> hash %p of size %d\n", hash, g_hash_table_size (hash));
- g_base_info_unref ((GIBaseInfo *) key_param_info);
+ g_base_info_unref ((GIBaseInfo *) key_param_info);
g_base_info_unref ((GIBaseInfo *) value_param_info);
return hash;
diff --git a/gperl-i11n-marshal-interface.c b/gperl-i11n-marshal-interface.c
index 82ec674..ed23e50 100644
--- a/gperl-i11n-marshal-interface.c
+++ b/gperl-i11n-marshal-interface.c
@@ -74,7 +74,7 @@ instance_pointer_to_sv (GICallableInfo *info, gpointer pointer)
case GI_INFO_TYPE_BOXED:
case GI_INFO_TYPE_STRUCT:
- case GI_INFO_TYPE_UNION:
+ case GI_INFO_TYPE_UNION:
{
GType type = get_gtype ((GIRegisteredTypeInfo *) container);
if (!type || type == G_TYPE_NONE) {
diff --git a/gperl-i11n-marshal-list.c b/gperl-i11n-marshal-list.c
index c674239..64a79b8 100644
--- a/gperl-i11n-marshal-list.c
+++ b/gperl-i11n-marshal-list.c
@@ -112,8 +112,8 @@ sv_to_glist (GITransfer transfer, GITypeInfo * type_info, SV * sv, GPerlI11nInvo
/* FIXME: Is it OK to always allow undef here? */
sv_to_arg (*svp, &arg, NULL, param_info,
item_transfer, TRUE, NULL);
- /* ENHANCEME: Could use g_[s]list_prepend and
- * later _reverse for efficiency. */
+ /* ENHANCEME: Could use g_[s]list_prepend and
+ * later _reverse for efficiency. */
if (is_slist)
list = g_slist_append (list, arg.v_pointer);
else
diff --git a/gperl-i11n-method.c b/gperl-i11n-method.c
index 547ec80..1e9d0c8 100644
--- a/gperl-i11n-method.c
+++ b/gperl-i11n-method.c
@@ -43,7 +43,7 @@ store_methods (HV *namespaced_functions, GIBaseInfo *info, GIInfoType info_type)
case GI_INFO_TYPE_UNION:
{
PUSH_METHODS (union, av, info);
- break;
+ break;
}
default:
diff --git a/gperl-i11n-size.c b/gperl-i11n-size.c
index fa5ed1b..5276969 100644
--- a/gperl-i11n-size.c
+++ b/gperl-i11n-size.c
@@ -26,8 +26,8 @@ size_of_type_tag (GITypeTag type_tag)
return sizeof (gdouble);
case GI_TYPE_TAG_GTYPE:
return sizeof (GType);
- case GI_TYPE_TAG_UNICHAR:
- return sizeof (gunichar);
+ case GI_TYPE_TAG_UNICHAR:
+ return sizeof (gunichar);
case GI_TYPE_TAG_VOID:
case GI_TYPE_TAG_UTF8:
@@ -38,9 +38,9 @@ size_of_type_tag (GITypeTag type_tag)
case GI_TYPE_TAG_GSLIST:
case GI_TYPE_TAG_GHASH:
case GI_TYPE_TAG_ERROR:
- ccroak ("Unable to determine the size of '%s'",
- g_type_tag_to_string (type_tag));
- break;
+ ccroak ("Unable to determine the size of '%s'",
+ g_type_tag_to_string (type_tag));
+ break;
}
return 0;
@@ -129,7 +129,7 @@ size_of_type_info (GITypeInfo *type_info)
case GI_TYPE_TAG_FLOAT:
case GI_TYPE_TAG_DOUBLE:
case GI_TYPE_TAG_GTYPE:
- case GI_TYPE_TAG_UNICHAR:
+ case GI_TYPE_TAG_UNICHAR:
if (g_type_info_is_pointer (type_info)) {
return sizeof (gpointer);
} else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]