summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-09-13 18:56:21 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-09-13 18:56:21 +0000
commitd7619fd81586585e1938b56d97a4f4c4505fc306 (patch)
tree2616782a2f44d99e8c64b2ac2b416212dde52f3b
parent7bf3c35e7b3070d8c9fc37dcca9097c0b9e597d6 (diff)
downloadpango-d7619fd81586585e1938b56d97a4f4c4505fc306.tar.gz
Remove unnecessary 'static' in type definition that causes a relocation.
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.
-rw-r--r--ChangeLog7
-rw-r--r--pango/pango-engine.h2
-rw-r--r--pango/shape.c4
3 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c48d1cd9..31b33f44 100644
--- 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
diff --git a/pango/pango-engine.h b/pango/pango-engine.h
index 2bd80c92..44ae681a 100644
--- a/pango/pango-engine.h
+++ b/pango/pango-engine.h
@@ -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, \
diff --git a/pango/shape.c b/pango/shape.c
index 96abd21b..fc165fbe 100644
--- a/pango/shape.c
+++ b/pango/shape.c
@@ -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[]