Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
gras_userdata_new expects the pointed type, not the pointer type. Fix tutorial, and...
[simgrid.git] / doc / gtut-tour-05-globals.doc
index b0bb570..b35c3f7 100644 (file)
@@ -42,6 +42,11 @@ should pass it a pointer to your data you want to retrieve afterward.
 \skip userdata_new
 \until userdata_new
 
+BEWARE, the gras_userdata_new expects the pointed type, not the
+pointer type. As you can see, in our example, you should pass
+server_data_t to the macro, even if the global variable is later
+defined as being of type server_data_t*.
+
 Once you declared a global that way, retriving this (for example in a
 callback) is really easy:
 \dontinclude 05-globals.c