From: Jim Evins Date: Sun, 11 Apr 2010 04:05:30 +0000 (-0400) Subject: Add place-holder field to all empty private structures X-Git-Tag: glabels-2_2_8~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=333e792ab9daa4cb6fba8f19d360ca27d69ebff0;p=glabels Add place-holder field to all empty private structures Fixes glabels bug #2981895. This is a work-around for glib bug #615379. For objects with no private data, add a place-holder field so that the private structure is not of zero length which causes g_new0() to crash in glib 2.24.0. --- diff --git a/src/view-barcode.c b/src/view-barcode.c index 522d334c..02b8f9fe 100644 --- a/src/view-barcode.c +++ b/src/view-barcode.c @@ -46,6 +46,7 @@ /*========================================================*/ struct _glViewBarcodePrivate { + int place_holder; /* Place holder for future private data. */ }; /*========================================================*/ diff --git a/src/view-box.c b/src/view-box.c index 42f39803..4d0941f2 100644 --- a/src/view-box.c +++ b/src/view-box.c @@ -47,6 +47,7 @@ /*========================================================*/ struct _glViewBoxPrivate { + int place_holder; /* Place holder for future private data. */ }; /*========================================================*/ diff --git a/src/view-ellipse.c b/src/view-ellipse.c index 85474704..6d86b5ae 100644 --- a/src/view-ellipse.c +++ b/src/view-ellipse.c @@ -48,6 +48,7 @@ /*========================================================*/ struct _glViewEllipsePrivate { + int place_holder; /* Place holder for future private data. */ }; /*========================================================*/ diff --git a/src/view-image.c b/src/view-image.c index 7612284d..b546baf5 100644 --- a/src/view-image.c +++ b/src/view-image.c @@ -47,6 +47,7 @@ /*========================================================*/ struct _glViewImagePrivate { + int place_holder; /* Place holder for future private data. */ }; /*========================================================*/ diff --git a/src/view-line.c b/src/view-line.c index 12f29a41..8c399658 100644 --- a/src/view-line.c +++ b/src/view-line.c @@ -47,6 +47,7 @@ /*========================================================*/ struct _glViewLinePrivate { + int place_holder; /* Place holder for future private data. */ }; /*========================================================*/ diff --git a/src/view-text.c b/src/view-text.c index ca930129..527c307d 100644 --- a/src/view-text.c +++ b/src/view-text.c @@ -46,6 +46,7 @@ /*========================================================*/ struct _glViewTextPrivate { + int place_holder; /* Place holder for future private data. */ }; /*========================================================*/