[seed] minor coding style fix using chang-format



commit 816a49e1edf6a087e67cf1779cdee9626fdc59fe
Author: Danilo Cesar Lemes de Paula <danilo cesar collabora co uk>
Date:   Mon Jun 13 11:26:24 2016 -0300

    minor coding style fix using chang-format

 libseed/seed-engine.c |    5 ++---
 libseed/seed-types.c  |   25 +++++++++++++++----------
 2 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/libseed/seed-engine.c b/libseed/seed-engine.c
index ca40d50..9ccc1a9 100644
--- a/libseed/seed-engine.c
+++ b/libseed/seed-engine.c
@@ -796,11 +796,10 @@ seed_gobject_method_invoked(JSContextRef ctx,
         //   along with supporting the old object.value way
         if (n_out_args < 1)
             retval_ref = JSValueMakeUndefined(ctx);
-        else if (n_out_args == 1){
+        else if (n_out_args == 1) {
             return_only_one_out = true;
             use_return_as_out = 1;
-        }
-        else {
+        } else {
             retval_ref = JSObjectMake(ctx, NULL, NULL);
             use_return_as_out = 1;
         }
diff --git a/libseed/seed-types.c b/libseed/seed-types.c
index 0bc2d39..27395e8 100644
--- a/libseed/seed-types.c
+++ b/libseed/seed-types.c
@@ -1093,26 +1093,31 @@ seed_value_from_gi_argument_full(JSContextRef ctx,
                 return seed_value_from_long(ctx, arg->v_long, exception);
             } else if (interface_type == GI_INFO_TYPE_STRUCT) {
 
-                // Trying to find out if this struct can be converted into GValue
-                // If it can be converted, just send the converted value back to JS context instead
+                // Trying to find out if this struct can be converted into
+                // GValue
+                // If it can be converted, just send the converted value back to
+                // JS context instead
                 // of the GValue itself.
-                GType gtype = g_registered_type_info_get_g_type((GIRegisteredTypeInfo*)interface);
-                if (G_TYPE_IS_INSTANTIATABLE(gtype) ||
-                    G_TYPE_IS_INTERFACE(gtype))
-                   gtype = G_TYPE_FROM_INSTANCE(arg->v_pointer);
+                GType gtype = g_registered_type_info_get_g_type(
+                  (GIRegisteredTypeInfo*) interface);
+                if (G_TYPE_IS_INSTANTIATABLE(gtype)
+                    || G_TYPE_IS_INTERFACE(gtype))
+                    gtype = G_TYPE_FROM_INSTANCE(arg->v_pointer);
 
-                SEED_NOTE(INVOCATION, "gtype of INTERFACE is %s", g_type_name(gtype));
+                SEED_NOTE(INVOCATION, "gtype of INTERFACE is %s",
+                          g_type_name(gtype));
                 if (g_type_is_a(gtype, G_TYPE_VALUE)) {
                     JSValueRef ret;
-                    // We're using seed_value_from_gvalue_for_signal with NULL signal handler
+                    // We're using seed_value_from_gvalue_for_signal with NULL
+                    // signal handler
                     // the current code will only handle basic types.
-                    if ((ret = seed_value_from_gvalue_for_signal(ctx, arg->v_pointer, exception, NULL, 0))) {
+                    if ((ret = seed_value_from_gvalue_for_signal(
+                           ctx, arg->v_pointer, exception, NULL, 0))) {
                         g_base_info_unref(interface);
                         return ret;
                     }
                 }
 
-
                 JSValueRef strukt;
 
                 strukt = seed_make_struct(ctx, arg->v_pointer, interface);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]