Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Cosmetics.
[simgrid.git] / src / simix / simcalls.py
index 80845da..a0803c9 100755 (executable)
@@ -156,7 +156,7 @@ class Simcall(object):
                                                       self.name,
                                                       ', '.join('%s %s' % (arg.rettype(), arg.name) for arg in self.args)))
         res.append('{')
-        res.append('  if (0) /* Go to that function to follow the code flow through the simcall barrier */')
+        res.append('  if (false) /* Go to that function to follow the code flow through the simcall barrier */')
         if self.need_handler:
             res.append('    simcall_HANDLER_%s(%s);' % (self.name,
                                                         ', '.join(["&SIMIX_process_self()->simcall_"] + [arg.name for arg in self.args])))
@@ -292,19 +292,19 @@ if __name__ == '__main__':
     fd.close()
 
     #
-    # popping_enum.h
+    # popping_enum.hpp
     #
-    fd = header("popping_enum.h")
+    fd = header("popping_enum.hpp")
     fd.write('/**\n')
     fd.write(' * @brief All possible simcalls.\n')
     fd.write(' */\n')
-    fd.write('typedef enum {\n')
+    fd.write('enum e_smx_simcall_t {\n')
     fd.write('  SIMCALL_NONE,\n')
 
     handle(fd, Simcall.enum, simcalls, simcalls_dict)
 
     fd.write('  NUM_SIMCALLS\n')
-    fd.write('} e_smx_simcall_t;\n')
+    fd.write('};\n')
     fd.close()
 
     #
@@ -325,12 +325,12 @@ if __name__ == '__main__':
 
     fd.write(
         '/** @brief Simcalls\' names (generated from src/simix/simcalls.in) */\n')
-    fd.write('const char* simcall_names[] = {\n')
+    fd.write('constexpr std::array<const char*, NUM_SIMCALLS> simcall_names{{\n')
 
     fd.write('    "SIMCALL_NONE",\n')
     handle(fd, Simcall.string, simcalls, simcalls_dict)
 
-    fd.write('};\n\n')
+    fd.write('}};\n\n')
 
     fd.write('/** @private\n')
     fd.write(