diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2019-12-29 13:23:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2019-12-29 13:23:47 (GMT) |
commit | a7a226fc4988c02841c106b4f1a8fd7af2c5a0c2 (patch) | |
tree | c783d1388a92e98acf68463339f574ad304125b5 /generic/tclOOCall.c | |
parent | 76c3874ad8500c1db1360a8a80ae1f8040f32448 (diff) | |
download | tcl-a7a226fc4988c02841c106b4f1a8fd7af2c5a0c2.zip tcl-a7a226fc4988c02841c106b4f1a8fd7af2c5a0c2.tar.gz tcl-a7a226fc4988c02841c106b4f1a8fd7af2c5a0c2.tar.bz2 |
Property definitions now work on instances.
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r-- | generic/tclOOCall.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c index f647fb7..6b88b3d 100644 --- a/generic/tclOOCall.c +++ b/generic/tclOOCall.c @@ -59,6 +59,7 @@ typedef struct { #define BUILDING_MIXINS 0x400000 #define TRAVERSED_MIXIN 0x800000 #define OBJECT_MIXIN 0x1000000 +#define DEFINE_FOR_CLASS 0x2000000 #define MIXIN_CONSISTENT(flags) \ (((flags) & OBJECT_MIXIN) || \ !((flags) & BUILDING_MIXINS) == !((flags) & TRAVERSED_MIXIN)) @@ -1896,7 +1897,7 @@ TclOOGetDefineContextNamespace( DefineEntry staticSpace[DEFINE_CHAIN_STATIC_SIZE]; DefineEntry *entryPtr; Tcl_Namespace *nsPtr = NULL; - int i; + int i, flags = (forClass ? DEFINE_FOR_CLASS : 0); define.list = staticSpace; define.num = 0; @@ -1907,8 +1908,8 @@ TclOOGetDefineContextNamespace( * class mixins right. */ - AddSimpleDefineNamespaces(oPtr, &define, forClass | BUILDING_MIXINS); - AddSimpleDefineNamespaces(oPtr, &define, forClass); + AddSimpleDefineNamespaces(oPtr, &define, flags | BUILDING_MIXINS); + AddSimpleDefineNamespaces(oPtr, &define, flags); /* * Go through the list until we find a namespace whose name we can @@ -1992,7 +1993,7 @@ AddSimpleClassDefineNamespaces( flags | TRAVERSED_MIXIN); } - if (flags & ~(TRAVERSED_MIXIN | BUILDING_MIXINS)) { + if (flags & DEFINE_FOR_CLASS) { AddDefinitionNamespaceToChain(classPtr, classPtr->clsDefinitionNs, definePtr, flags); } else { |