summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler/util_cc_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/json_schema_compiler/util_cc_helper.py')
-rw-r--r--tools/json_schema_compiler/util_cc_helper.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/json_schema_compiler/util_cc_helper.py b/tools/json_schema_compiler/util_cc_helper.py
index c3acd5f..d69122d 100644
--- a/tools/json_schema_compiler/util_cc_helper.py
+++ b/tools/json_schema_compiler/util_cc_helper.py
@@ -12,18 +12,12 @@ class UtilCCHelper(object):
def __init__(self, type_manager):
self._type_manager = type_manager
- def PopulateArrayFromList(self, src, dst, optional):
- """Generates code to get an array from src into dst.
-
- src: ListValue*
- dst: std::vector or scoped_ptr<std::vector>
+ def PopulateArrayFromListFunction(self, optional):
+ """Returns the function to turn a list into a vector.
"""
populate_list_fn = ('PopulateOptionalArrayFromList' if optional
else 'PopulateArrayFromList')
- return ('%s::%s(*%s, &%s)') % (_API_UTIL_NAMESPACE,
- populate_list_fn,
- src,
- dst)
+ return ('%s::%s') % (_API_UTIL_NAMESPACE, populate_list_fn)
def CreateValueFromArray(self, src, optional):
"""Generates code to create a scoped_pt<Value> from the array at src.