stage4/generate_c/generate_c_il.cc
changeset 721 5dc33058e041
parent 693 51a2fa6441b9
child 762 a3d917474ae4
--- a/stage4/generate_c/generate_c_il.cc	Thu Nov 08 17:31:29 2012 +0000
+++ b/stage4/generate_c/generate_c_il.cc	Thu Nov 08 17:31:50 2012 +0000
@@ -847,8 +847,8 @@
   }
 
   /* Check whether we are calling an overloaded function! */
-  /* (fdecl_mutiplicity==2)  => calling overloaded function */
-  int fdecl_mutiplicity =  function_symtable.multiplicity(symbol->function_name);
+  /* (fdecl_mutiplicity > 1)  => calling overloaded function */
+  int fdecl_mutiplicity =  function_symtable.count(symbol->function_name);
   if (fdecl_mutiplicity == 0) ERROR;
 
   this->implicit_variable_result.accept(*this);
@@ -868,7 +868,7 @@
     fbname->accept(*this);
     s4o.print("_");
     function_name->accept(*this);
-    if (fdecl_mutiplicity == 2) {
+    if (fdecl_mutiplicity > 1) {
       /* function being called is overloaded! */
       s4o.print("__");
       print_function_parameter_data_types_c overloaded_func_suf(&s4o);
@@ -879,7 +879,7 @@
   else {
     if (function_name != NULL) {
           function_name->accept(*this);
-          if (fdecl_mutiplicity == 2) {
+          if (fdecl_mutiplicity > 1) {
             /* function being called is overloaded! */
             s4o.print("__");
             print_function_parameter_data_types_c overloaded_func_suf(&s4o);
@@ -1234,8 +1234,8 @@
   }
 
   /* Check whether we are calling an overloaded function! */
-  /* (fdecl_mutiplicity==2)  => calling overloaded function */
-  int fdecl_mutiplicity =  function_symtable.multiplicity(symbol->function_name);
+  /* (fdecl_mutiplicity > 1)  => calling overloaded function */
+  int fdecl_mutiplicity =  function_symtable.count(symbol->function_name);
   if (fdecl_mutiplicity == 0) ERROR;
   if (fdecl_mutiplicity == 1) 
     /* function being called is NOT overloaded! */
@@ -1258,7 +1258,7 @@
     fbname->accept(*this);
     s4o.print("_");
     function_name->accept(*this);
-    if (fdecl_mutiplicity == 2) {
+    if (fdecl_mutiplicity > 1) {
       /* function being called is overloaded! */
       s4o.print("__");
       print_function_parameter_data_types_c overloaded_func_suf(&s4o);
@@ -1269,7 +1269,7 @@
   else {
     if (function_name != NULL) {
       function_name->accept(*this);
-      if (fdecl_mutiplicity == 2) {
+      if (fdecl_mutiplicity > 1) {
         /* function being called is overloaded! */
         s4o.print("__");
         print_function_parameter_data_types_c overloaded_func_suf(&s4o);