[pygobject] Fix Pango FontDescription override
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Fix Pango FontDescription override
- Date: Tue, 18 Jan 2011 15:48:11 +0000 (UTC)
commit 8878c57676091c08e66bc6cbe735d898cb420582
Author: Martin Pitt <martin pitt ubuntu com>
Date: Tue Jan 18 16:47:10 2011 +0100
Fix Pango FontDescription override
Trying to call __new__() on a record crashes with a MemoryError, so just call
the intended static factory method for a None argument as well (which works
just fine now).
gi/overrides/Pango.py | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/gi/overrides/Pango.py b/gi/overrides/Pango.py
index 714d35d..423e1fb 100644
--- a/gi/overrides/Pango.py
+++ b/gi/overrides/Pango.py
@@ -28,12 +28,7 @@ __all__ = []
class FontDescription(Pango.FontDescription):
def __new__(cls, string=None):
- if string is not None:
- # FIXME: this should be Pango.FontDescription.from_string()
- # GI bug?
- return Pango.font_description_from_string (string)
- else:
- return Pango.FontDescription.__new__(cls)
+ return Pango.font_description_from_string (string)
FontDescription = override(FontDescription)
__all__.append('FontDescription')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]