generate_IEC_std.py
changeset 291 e580c945c62a
parent 284 6cf858411d3a
child 307 fd1f6ae26d4f
equal deleted inserted replaced
290:56c4fe6b7012 291:e580c945c62a
   186             
   186             
   187             if code_gen[1] is not None:
   187             if code_gen[1] is not None:
   188                 res += "function_name = (symbol_c*)(new pragma_c(\"%s\"));\n"%code_gen[1]
   188                 res += "function_name = (symbol_c*)(new pragma_c(\"%s\"));\n"%code_gen[1]
   189             if fdecl["extensible"]:
   189             if fdecl["extensible"]:
   190                 res += """
   190                 res += """
   191 char nb_param_str[10];
   191 char* nb_param_str = new char[10];
   192 sprintf(nb_param_str, "%d", nb_param);
   192 sprintf(nb_param_str, "%d", nb_param);
   193 ADD_PARAM_LIST((symbol_c*)(new integer_c(nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
   193 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in)
   194 """
   194 """
   195             for paramname,paramtype,unused in fdecl["inputs"]:
   195             for paramname,paramtype,unused in fdecl["inputs"]:
   196                 res += "ADD_PARAM_LIST(%(input_name)s_param_value, %(input_name)s_type_symbol, function_param_iterator_c::direction_in)\n"%{"input_name" : paramname}
   196                 res += "ADD_PARAM_LIST(%(input_name)s_param_value, %(input_name)s_type_symbol, function_param_iterator_c::direction_in)\n"%{"input_name" : paramname}
   197 
   197 
   198             if fdecl["extensible"]:
   198             if fdecl["extensible"]: