Commit 10d4cfc5 authored by Olivier Aubert's avatar Olivier Aubert

python-ctypes: fix indent issue

parent 109ee984
...@@ -467,8 +467,8 @@ class PythonGenerator(object): ...@@ -467,8 +467,8 @@ class PythonGenerator(object):
self.output(" }") self.output(" }")
self.output(""" self.output("""
def __repr__(self): def __repr__(self):
return ".".join((self.__class__.__module__, self.__class__.__name__, self._names[self.value])) return ".".join((self.__class__.__module__, self.__class__.__name__, self._names[self.value]))
""") """)
def output_ctypes(self, rtype, method, params, comment): def output_ctypes(self, rtype, method, params, comment):
...@@ -572,23 +572,23 @@ class PythonGenerator(object): ...@@ -572,23 +572,23 @@ class PythonGenerator(object):
self.output(' """%s\n """' % docstring[classname]) self.output(' """%s\n """' % docstring[classname])
self.output(""" self.output("""
def __new__(cls, pointer=None): def __new__(cls, pointer=None):
'''Internal method used for instanciating wrappers from ctypes. '''Internal method used for instanciating wrappers from ctypes.
''' '''
if pointer is None: if pointer is None:
raise Exception("Internal method. Surely this class cannot be instanciated by itself.") raise Exception("Internal method. Surely this class cannot be instanciated by itself.")
if pointer == 0: if pointer == 0:
return None return None
else: else:
o=object.__new__(cls) o=object.__new__(cls)
o._as_parameter_=ctypes.c_void_p(pointer) o._as_parameter_=ctypes.c_void_p(pointer)
return o return o
@staticmethod @staticmethod
def from_param(arg): def from_param(arg):
'''(INTERNAL) ctypes parameter conversion method. '''(INTERNAL) ctypes parameter conversion method.
''' '''
return arg._as_parameter_ return arg._as_parameter_
""" % {'name': classname}) """ % {'name': classname})
if classname in overrides: if classname in overrides:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment