summaryrefslogtreecommitdiff
path: root/pango/pango-types.h
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-02-01 18:52:17 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-02-01 18:52:17 +0000
commit82d8346691a72e4dd37a1e3999a939be269df32d (patch)
tree644477eb228b5e7f96460ae3e94bd718006d8937 /pango/pango-types.h
parent532c6902c34f47d5f838623c951e53d5fcdd395f (diff)
downloadpango-82d8346691a72e4dd37a1e3999a939be269df32d.tar.gz
Conditionally define G_N_ELEMENTS() when using glib-1.3.
Wed Feb 2 11:12:12 2000 Owen Taylor <otaylor@redhat.com> * libpango/pango-types.h: Conditionally define G_N_ELEMENTS() when using glib-1.3. * modules/basic/basic.c modules/hangul/hangul.c modules/tamil/tamil.c: Replace MEMBERS() with G_N_ELEMENTS(). * libpango/pango-engine.h: Added a get_coverage() function to the PangoEngineShape vtable. * modules/basic/basic.c modules/hangul/hangul.c modules/tamil/tamil.c: Added get_coverage() functions. The basic.c one is incredibly inefficient (but caching may make that matter that much). The Hangul one needs checking.
Diffstat (limited to 'pango/pango-types.h')
-rw-r--r--pango/pango-types.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/pango/pango-types.h b/pango/pango-types.h
index f702a722..46dc794b 100644
--- a/pango/pango-types.h
+++ b/pango/pango-types.h
@@ -23,6 +23,13 @@
#define __PANGO_TYPES_H__
#include <glib.h>
+
+/* Include this here, since we don't depend on GLib 1.3 yet */
+
+#ifndef G_N_ELEMENTS
+#define G_N_ELEMENTS(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
+
typedef struct _PangoAnalysis PangoAnalysis;
typedef struct _PangoItem PangoItem;
typedef struct _PangoLangRange PangoLangRange;