Commit 8939521b authored by Stefan Behnel's avatar Stefan Behnel

utility code construction for struct conversion requires constructing the...

utility code construction for struct conversion requires constructing the field conversion functions as well

--HG--
extra : amend_source : af016229b6c8c40168070e4d3a9581ed12500d3f
parent c50cd96e
...@@ -2879,8 +2879,7 @@ class CStructOrUnionType(CType): ...@@ -2879,8 +2879,7 @@ class CStructOrUnionType(CType):
if self._convert_to_py_code is None: if self._convert_to_py_code is None:
for member in self.scope.var_entries: for member in self.scope.var_entries:
if (not member.type.to_py_function and if not member.type.create_to_py_utility_code(env):
not member.type.create_to_py_utility_code(env)):
self.to_py_function = None self.to_py_function = None
self._convert_to_py_code = False self._convert_to_py_code = False
return False return False
...@@ -2898,8 +2897,7 @@ class CStructOrUnionType(CType): ...@@ -2898,8 +2897,7 @@ class CStructOrUnionType(CType):
if self._convert_from_py_code is None: if self._convert_from_py_code is None:
for member in self.scope.var_entries: for member in self.scope.var_entries:
if (not member.type.from_py_function and if not member.type.create_from_py_utility_code(env):
not member.type.create_from_py_utility_code(env)):
self.from_py_function = None self.from_py_function = None
self._convert_from_py_code = False self._convert_from_py_code = False
return False return False
......
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