From 6fbd1c3bf3c86534937db62cb9cc6f763cf6fff9 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sat, 22 Mar 2008 14:51:00 +0000 Subject: [PATCH] Apparently, in C++ implicit conversions are not transitive. --- pybindgen/cppclass.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index b62411b..848a280 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -613,17 +613,18 @@ class CppClass(object): >>> l = Foo.get_all_implicit_conversions() >>> l.sort(lambda cls1, cls2: cmp(cls1.name, cls2.name)) >>> [cls.name for cls in l] - ['Bar', 'Zbr'] + ['Bar'] """ - classes = [] - to_visit = list(self.implicitly_converts_from) - while to_visit: - source = to_visit.pop(0) - if source in classes or source is self: - continue - classes.append(source) - to_visit.extend(source.implicitly_converts_from) - return classes + return list(self.implicitly_converts_from) +# classes = [] +# to_visit = list(self.implicitly_converts_from) +# while to_visit: +# source = to_visit.pop(0) +# if source in classes or source is self: +# continue +# classes.append(source) +# to_visit.extend(source.implicitly_converts_from) +# return classes def _update_names(self):