diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-05-15 08:03:57 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-08 20:54:53 +0200 |
commit | d736c075cd697fe38e0d7836d127c8bd7d884ada (patch) | |
tree | 06187d0a4e27bb2c067d77e6626cd014c15fe3c6 /giscanner/message.py | |
parent | 2daced86c79a888cdedddc84ed7dee736483bc05 (diff) | |
download | gobject-introspection-d736c075cd697fe38e0d7836d127c8bd7d884ada.tar.gz |
giscanner: define __slots__ on some classes
For example, when creating Gtk-3.0.gir, thousands of instances
of these classes get created. This makes us waste less space
for these instances by not having their __dict__ being created.
Diffstat (limited to 'giscanner/message.py')
-rw-r--r-- | giscanner/message.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/message.py b/giscanner/message.py index 3a330afe..fc6100e0 100644 --- a/giscanner/message.py +++ b/giscanner/message.py @@ -34,6 +34,9 @@ class Position(object): """Represents a position in the source file which we want to inform about. """ + + __slots__ = ('filename', 'line', 'column') + def __init__(self, filename=None, line=None, column=None): self.filename = filename self.line = line |