From 5fe280ac96a2c13f613b7138bb239c3f36d35c9f Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Mon, 17 Oct 2016 18:15:20 -0700 Subject: Cleanup ReadArgs & ReadValueArgs usage ReadArgs will switch to using std::string and std::unique_ptr. Also cleanup the callers. Test: mma & component test passed. Change-Id: I4724406ae6c0c134a27bbd1cdd24ad5d343b2a3b --- edify/expr.h | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'edify/expr.h') diff --git a/edify/expr.h b/edify/expr.h index 85306542d..911adbc82 100644 --- a/edify/expr.h +++ b/edify/expr.h @@ -128,30 +128,7 @@ bool ReadArgs(State* state, int argc, Expr* argv[], std::vector* ar // Evaluate the expressions in argv, and put the results of Value* in // args. If any expression evaluate to nullptr, free the rest and return // false. Return true on success. -bool ReadValueArgs(State* state, int argc, Expr* argv[], - std::vector>* args); - -// Evaluate the expressions in argv, giving 'count' char* (the ... is -// zero or more char** to put them in). If any expression evaluates -// to NULL, free the rest and return -1. Return 0 on success. -int ReadArgs(State* state, Expr* argv[], int count, ...); - -// Evaluate the expressions in argv, giving 'count' Value* (the ... is -// zero or more Value** to put them in). If any expression evaluates -// to NULL, free the rest and return -1. Return 0 on success. -int ReadValueArgs(State* state, Expr* argv[], int count, ...); - -// Evaluate the expressions in argv, returning an array of char* -// results. If any evaluate to NULL, free the rest and return NULL. -// The caller is responsible for freeing the returned array and the -// strings it contains. -char** ReadVarArgs(State* state, int argc, Expr* argv[]); - -// Evaluate the expressions in argv, returning an array of Value* -// results. If any evaluate to NULL, free the rest and return NULL. -// The caller is responsible for freeing the returned array and the -// Values it contains. -Value** ReadValueVarArgs(State* state, int argc, Expr* argv[]); +bool ReadValueArgs(State* state, int argc, Expr* argv[], std::vector>* args); // Use printf-style arguments to compose an error message to put into // *state. Returns NULL. -- cgit v1.2.3