Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1319abf

Browse files
committed
Make basechain a class variable in stead of initializing it in __init__. That way it's more easily overridden.
1 parent 08a898f commit 1319abf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Tools/bgen/bgen/bgenObjectDefinition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
class ObjectDefinition(GeneratorGroup):
55
"Spit out code that together defines a new Python object type"
6+
basechain = "NULL"
67

78
def __init__(self, name, prefix, itselftype):
89
"""ObjectDefinition constructor. May be extended, but do not override.
@@ -21,7 +22,6 @@ def __init__(self, name, prefix, itselftype):
2122
self.typename = name + '_Type'
2223
self.argref = "" # set to "*" if arg to <type>_New should be pointer
2324
self.static = "static " # set to "" to make <type>_New and <type>_Convert public
24-
self.basechain = "NULL" # set to &<basetype>_chain to chain methods
2525

2626
def add(self, g, dupcheck=0):
2727
g.setselftype(self.objecttype, self.itselftype)

0 commit comments

Comments
 (0)