check_bar_proxy (FooiGenBar *proxy,
GMainLoop *thread_loop)
{
+ const gchar *array_of_strings[3] = {"one", "two", NULL};
+ const gchar *array_of_strings_2[3] = {"one2", "two2", NULL};
+ const gchar *array_of_objpaths[3] = {"/one", "/one/two", NULL};
+ const gchar *array_of_bytestrings[3] = {"one\xff", "two\xff", NULL};
guchar ret_val_byte;
gboolean ret_val_boolean;
gint16 ret_val_int16;
gchar *val_finally_normal_name;
GVariant *v;
gchar *s;
+ const gchar *const *read_as;
+ const gchar *const *read_as2;
+ const gchar *const *read_as3;
data = g_new0 (ClientData, 1);
data->thread_loop = thread_loop;
/* Try setting properties that requires memory management. This
* is to exercise the paths that frees the references.
*/
- const gchar *array_of_strings[3] = {"one", "two", NULL};
- const gchar *array_of_strings_2[3] = {"one2", "two2", NULL};
- const gchar *array_of_objpaths[3] = {"/one", "/one/two", NULL};
- const gchar *array_of_bytestrings[3] = {"one\xff", "two\xff", NULL};
g_object_set (proxy,
"s", "a string",
* updates on them works as well (See comment for "property vfuncs"
* in gio/gdbus-codegen/codegen.py for details)
*/
- const gchar *const *read_as;
- const gchar *const *read_as2;
- const gchar *const *read_as3;
read_as = foo_igen_bar_get_as (proxy);
read_as2 = foo_igen_bar_get_as (proxy);
g_assert_cmpint (g_strv_length ((gchar **) read_as), ==, 2);
g_thread_abort (errno, "malloc");
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
- pthread_mutexattr_t attr;
- pthread_mutexattr_init (&attr);
- pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
- pattr = &attr;
+ {
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init (&attr);
+ pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ pattr = &attr;
+ }
#endif
if G_UNLIKELY ((status = pthread_mutex_init (mutex, pattr)) != 0)
{
GTimeZone *tz;
GDateTime *dt;
+ gchar *p;
g_test_bug ("642935");
tz = g_time_zone_new ("-08:00");
dt = g_date_time_new (tz, 0, 0, 0, 0, 0, 0);
- gchar *p = g_date_time_format (dt, "%z");
+ p = g_date_time_format (dt, "%z");
g_assert_cmpstr (p, ==, "-0800");
g_date_time_unref (dt);
g_time_zone_unref (tz);