diff options
Diffstat (limited to 'gtk/gtktextchild.c')
-rw-r--r-- | gtk/gtktextchild.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gtk/gtktextchild.c b/gtk/gtktextchild.c index 7b00005b90..716132bd75 100644 --- a/gtk/gtktextchild.c +++ b/gtk/gtktextchild.c @@ -52,8 +52,22 @@ #include "gtktextbtree.h" #include "gtktextlayout.h" -#define CHECK_IN_BUFFER(anchor) do { if ((anchor)->segment == NULL) g_warning ("%s: GtkTextChildAnchor hasn't been in a buffer yet", G_GNUC_FUNCTION); } while (0) -#define CHECK_IN_BUFFER_RETURN(anchor, val) do { if ((anchor)->segment == NULL) g_warning ("%s: GtkTextChildAnchor hasn't been in a buffer yet", G_GNUC_FUNCTION); return (val); } while (0) +#define CHECK_IN_BUFFER(anchor) \ + G_STMT_START { \ + if ((anchor)->segment == NULL) \ + { \ + g_warning ("%s: GtkTextChildAnchor hasn't been in a buffer yet", G_GNUC_FUNCTION); \ + } \ + } G_STMT_END + +#define CHECK_IN_BUFFER_RETURN(anchor, val) \ + G_STMT_START { \ + if ((anchor)->segment == NULL) \ + { \ + g_warning ("%s: GtkTextChildAnchor hasn't been in a buffer yet", G_GNUC_FUNCTION); \ + return (val); \ + } \ + } G_STMT_END static GtkTextLineSegment * pixbuf_segment_cleanup_func (GtkTextLineSegment *seg, |