Remove unnecessary 'static' in type definition that causes a relocation.
authorBehdad Esfahbod <behdad@gnome.org>
Wed, 13 Sep 2006 18:56:21 +0000 (18:56 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Wed, 13 Sep 2006 18:56:21 +0000 (18:56 +0000)
2006-09-13  Behdad Esfahbod  <behdad@gnome.org>

        * pango/pango-engine.h: Remove unnecessary 'static' in type definition
        that causes a relocation.

        * pango/shape.c (pango_shape): Make sure last_cluster is invalid.

ChangeLog
pango/pango-engine.h
pango/shape.c

index c48d1cd..31b33f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-09-13  Behdad Esfahbod  <behdad@gnome.org>
 
+       * pango/pango-engine.h: Remove unnecessary 'static' in type definition
+       that causes a relocation.
+
+       * pango/shape.c (pango_shape): Make sure last_cluster is invalid.
+
+2006-09-13  Behdad Esfahbod  <behdad@gnome.org>
+
        Part of Bug 355782 – Misaligned extents in pango
 
        * pango/pango-layout.c (cluster_width): Rewrite based on
index 2bd80c9..44ae681 100644 (file)
@@ -270,7 +270,7 @@ static GType prefix ## _type;                                                 \
 static void                                                              \
 prefix ## _register_type (GTypeModule *module)                           \
 {                                                                        \
-  static const GTypeInfo object_info =                                   \
+  const GTypeInfo object_info =                                                  \
     {                                                                    \
       sizeof (name ## Class),                                            \
       (GBaseInitFunc) NULL,                                              \
index 96abd21..fc165fb 100644 (file)
@@ -44,7 +44,7 @@ pango_shape (const gchar      *text,
              PangoGlyphString *glyphs)
 {
   int i;
-  int last_cluster = -1;
+  int last_cluster;
 
   if (G_LIKELY (PANGO_IS_ENGINE_SHAPE (analysis->shape_engine) && PANGO_IS_FONT (analysis->font)))
     {
@@ -109,6 +109,8 @@ pango_shape (const gchar      *text,
                                 text, length, analysis, glyphs);
     }
 
+  /* make sure last_cluster is invalid */
+  last_cluster = glyphs->log_clusters[0] - 1;
   for (i = 0; i < glyphs->num_glyphs; i++)
     {
      /* Set glyphs[i].attr.is_cluster_start based on log_clusters[]