From 3ca542e7d6cbe58d1d7380b7f21dba7fd90828ec Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 5 Jan 2004 23:40:20 +0000 Subject: [PATCH] we might need to upcast even in single inheritance --- direct/src/ffi/FFITypes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/ffi/FFITypes.py b/direct/src/ffi/FFITypes.py index e512e275d9..1c2f2ca14a 100644 --- a/direct/src/ffi/FFITypes.py +++ b/direct/src/ffi/FFITypes.py @@ -400,7 +400,8 @@ class ClassTypeDescriptor(BaseTypeDescriptor): At multiple inheritance nodes, copy all the parent methods into this class and call them after upcasting us to that class """ - if (len(self.parentTypes) >= 2): + if (len(self.parentTypes) >= 2 or \ + (len(self.parentTypes) == 1 and self.hasMethodNamed('upcastTo' + self.parentTypes[0].foreignTypeName))): indent(file, nesting+1, '\n') indent(file, nesting+1, '##################################################\n') indent(file, nesting+1, '# Upcast inherited instance method wrappers #\n')