MCPcopy Create free account
hub / github.com/apache/thrift / compare_single_function

Function compare_single_function

compiler/cpp/src/thrift/audit/t_audit.cpp:327–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327void compare_single_function(t_function* newFunction, t_function* oldFunction)
328{
329 t_type* newFunctionReturnType = newFunction->get_returntype();
330
331 if(newFunction->is_oneway() != oldFunction->is_oneway())
332 {
333 thrift_audit_failure("Oneway attribute changed for function %s\n",oldFunction->get_name().c_str());
334 }
335 if(!compare_type(newFunctionReturnType, oldFunction->get_returntype()))
336 {
337 thrift_audit_failure("Return type changed for function %s\n",oldFunction->get_name().c_str());
338 }
339
340 //Compare function arguments.
341 compare_single_struct(newFunction->get_arglist(), oldFunction->get_arglist());
342 std::string exceptionName = oldFunction->get_name();
343 exceptionName += "_exception";
344 compare_single_struct(newFunction->get_xceptions(), oldFunction->get_xceptions(), exceptionName);
345}
346
347void compare_functions(const std::vector<t_function*>& newFunctionList, const std::vector<t_function*>& oldFunctionList)
348{

Callers 1

compare_functionsFunction · 0.85

Calls 8

thrift_audit_failureFunction · 0.85
compare_typeFunction · 0.85
compare_single_structFunction · 0.85
get_returntypeMethod · 0.80
is_onewayMethod · 0.80
get_arglistMethod · 0.80
get_xceptionsMethod · 0.80
get_nameMethod · 0.45

Tested by

no test coverage detected