diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-09 22:38:11 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-09 22:38:11 -0400 |
| commit | 50a227058a8d72f1fb885458b882cedb0e0d7f79 (patch) | |
| tree | c68e86810a6036645278b707430532d9f767c7cc /new/container_unix.c | |
| parent | d9315e6d8f528840dd396fbbeb96cb22c8a5df98 (diff) | |
Changed the allocation logging from a compile-time setting to the first initialization option.
Diffstat (limited to 'new/container_unix.c')
| -rw-r--r-- | new/container_unix.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/new/container_unix.c b/new/container_unix.c index 279e418..5ee421c 100644 --- a/new/container_unix.c +++ b/new/container_unix.c @@ -5,9 +5,8 @@ G_DEFINE_TYPE(uiContainer, uiContainer, GTK_TYPE_CONTAINER) static void uiContainer_init(uiContainer *c) { -#ifdef uiLogAllocations - fprintf(stderr, "%p alloc uiContainer\n", c); -#endif + if (options.debugLogAllocations) + fprintf(stderr, "%p alloc uiContainer\n", c); c->children = g_ptr_array_new(); gtk_widget_set_has_window(GTK_WIDGET(c), FALSE); } @@ -32,9 +31,8 @@ static void uiContainer_dispose(GObject *obj) static void uiContainer_finalize(GObject *obj) { G_OBJECT_CLASS(uiContainer_parent_class)->finalize(obj); -#ifdef uiLogAllocations - fprintf(stderr, "%p free\n", obj); -#endif + if (options.debugLogAllocations) + fprintf(stderr, "%p free\n", obj); } static void uiContainer_add(GtkContainer *container, GtkWidget *widget) |
