From a2068d07897368f31691f86858e4635792dd155f Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Wed, 2 Jul 2008 10:52:29 +0100 Subject: [PATCH] s/operator_os/output_stream_operator/ (more readable) --- pybindgen/cppclass.py | 8 ++++---- pybindgen/gccxmlparser.py | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index 39468f8..1f06aab 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -409,7 +409,7 @@ class CppClass(object): self.helper_class_disabled = False self.cannot_be_constructed = '' # reason self.has_trivial_constructor = False - self.has_operator_os = False + self.has_output_stream_operator = False self._have_pure_virtual_methods = None ## list of CppClasses from which a value of this class can be ## implicitly generated; corresponds to a @@ -1084,8 +1084,8 @@ public: if not wrapper.parameters: self.has_trivial_constructor = True - def add_operator_os(self): - self.has_operator_os = True + def add_output_stream_operator(self): + self.has_output_stream_operator = True def add_constructor(self, *args, **kwargs): """ @@ -1322,7 +1322,7 @@ typedef struct { self._generate_gc_methods(code_sink) self._generate_destructor(code_sink, have_constructor) - if self.has_operator_os: + if self.has_output_stream_operator: self._generate_str(code_sink) self._generate_type_structure(code_sink, docstring) diff --git a/pybindgen/gccxmlparser.py b/pybindgen/gccxmlparser.py index ddda34d..c5792ec 100644 --- a/pybindgen/gccxmlparser.py +++ b/pybindgen/gccxmlparser.py @@ -1211,7 +1211,7 @@ pybindgen.settings.error_handler = ErrorHandler() def _scan_class_methods(self, cls, class_wrapper, pygen_sink): have_trivial_constructor = False have_copy_constructor = False - has_operator_os = False + has_output_stream_operator = False for op in self.module_namespace.free_operators(function=self.location_filter, @@ -1221,7 +1221,7 @@ pybindgen.settings.error_handler = ErrorHandler() and len (op.arguments) >= 2 \ and self._is_ostream (op.arguments[0].type) \ and type_traits.is_convertible (cls, op.arguments[1].type): - has_operator_os = True + has_output_stream_operator = True for op in cls.member_operators(function=self.location_filter, allow_empty=True, @@ -1230,7 +1230,7 @@ pybindgen.settings.error_handler = ErrorHandler() and len (op.arguments) >= 2 \ and self._is_ostream (op.arguments[0].type) \ and type_traits.is_convertible (cls, op.arguments[1].type): - has_operator_os = True + has_output_stream_operator = True if pygen_sink is None: pygen_sink = NullCodeSink() @@ -1506,8 +1506,8 @@ pybindgen.settings.error_handler = ErrorHandler() class_wrapper.add_constructor([ class_wrapper.ThisClassRefParameter("%s const &" % class_wrapper.full_name, 'ctor_arg', is_const=True)]) - if has_operator_os: - pygen_sink.writeln("cls.add_operator_os()") + if has_output_stream_operator: + pygen_sink.writeln("cls.add_output_stream_operator()") def scan_functions(self):