summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler/cc_generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/json_schema_compiler/cc_generator.py')
-rw-r--r--tools/json_schema_compiler/cc_generator.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index 6faac39..4fa55be 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -778,10 +778,9 @@ class _Generator(object):
failure_value,
is_ptr=is_ptr))
else:
- c.Sblock('if (!%s) {' % self._util_cc_helper.PopulateArrayFromList(
- 'list',
- dst_var,
- is_ptr))
+ c.Sblock('if (!%s(%s)) {' % (
+ self._util_cc_helper.PopulateArrayFromListFunction(is_ptr),
+ self._GenerateArgs(('*list', '&%(dst_var)s'))))
c.Concat(self._GenerateError(
'"unable to populate array \'%%(parent_key)s\'"'))
if is_ptr and self._generate_error_messages: