Skip to content

Commit

Permalink
Move printing return variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Oct 18, 2024
1 parent 0a0d068 commit fcfbbd1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codegen/codegen_neuron_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ void CodegenNeuronCppVisitor::print_hoc_py_wrapper_call_impl(
func_call.append(")");
return func_call;
};


printer->add_line("double _r = 0.0;");
if (function_or_procedure_block->is_function_block()) {
printer->add_indent();
printer->fmt_text("_r = {};", get_func_call_str());
Expand All @@ -318,7 +321,6 @@ void CodegenNeuronCppVisitor::print_hoc_py_wrapper_setup(
InterpreterWrapper wrapper_type) {
const auto block_name = function_or_procedure_block->get_node_name();
printer->add_multi_line(R"CODE(
double _r{};
Datum* _ppvar;
Datum* _thread;
NrnThread* nt;
Expand Down

0 comments on commit fcfbbd1

Please sign in to comment.