Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change the type of globals to pointer-of-the-type.
[simgrid.git] / src / smpi / replace_globals.cocci
index a49237c..591f27d 100644 (file)
@@ -32,16 +32,16 @@ position p != { localvardecl.p, funcproto.p };
 expression E;
 @@
 (
--
-+T*
+T 
++ *
 b@p
-+ = SMPI_INITIALIZE_GLOBAL(T)
++ = SMPI_INITIALIZE_GLOBAL(b, T)
 ;
 |
--T 
-+T*
+T
++ *
 b@p = 
-+ SMPI_INITIALIZE_AND_SET_GLOBAL(T,
++ SMPI_INITIALIZE_AND_SET_GLOBAL(b, T,
 E
 +)
 ;
@@ -51,6 +51,8 @@ E
 local idexpression x;
 identifier globalvardecl.b;
 @@
+{
+<...
 (
 x
 |
@@ -58,3 +60,5 @@ x
 b
 +)
 )
+...>
+}