pygobject r1001 - in trunk: . codegen
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: pygobject r1001 - in trunk: . codegen
- Date: Fri, 6 Feb 2009 08:22:03 +0000 (UTC)
Author: murrayc
Date: Fri Feb 6 08:22:03 2009
New Revision: 1001
URL: http://svn.gnome.org/viewvc/pygobject?rev=1001&view=rev
Log:
2009-02-06 Murray Cumming <murrayc murrayc com>
* codegen/h2def.py DefsWriter::write_enum_defs(): Prevent an exception
when the prefix is empty.
Modified:
trunk/ChangeLog
trunk/codegen/h2def.py
Modified: trunk/codegen/h2def.py
==============================================================================
--- trunk/codegen/h2def.py (original)
+++ trunk/codegen/h2def.py Fri Feb 6 08:22:03 2009
@@ -331,7 +331,7 @@
for ent in entries:
# shorten prefix til we get a match ...
# and handle GDK_FONT_FONT, GDK_FONT_FONTSET case
- while (prefix[-1] != '_' or ent[:len(prefix)] != prefix
+ while ((len(prefix) and prefix[-1] != '_') or ent[:len(prefix)] != prefix
or len(prefix) >= len(ent)):
prefix = prefix[:-1]
prefix_len = len(prefix)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]