Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: tools/json_schema_compiler/util_cc_helper.py

Issue 1128523003: Add support for passing errors through PopulateArrayFromList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated JSON schema tests. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/json_schema_compiler/util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/util_cc_helper.py
diff --git a/tools/json_schema_compiler/util_cc_helper.py b/tools/json_schema_compiler/util_cc_helper.py
index c3acd5fa1d1ac4d9da3e5f52dd1693cd3672b5a0..d69122dfc38cb1baba864f64d56c1735aceacb4c 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.
« no previous file with comments | « tools/json_schema_compiler/util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698