Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't memset to zero
[simgrid.git] / src / bindings / lua / lua_utils.h
index b36e217..a57eebc 100644 (file)
@@ -6,21 +6,26 @@
 
 /* SimGrid Lua helper functions                                             */
 
+#ifndef LUA_UTILS_H
+#define LUA_UTILS_H
+
 #include <lua.h>
 
 /**
  * @brief A chunk of memory.
  *
- * TODO replace this by a dynar
+ * This structure is used as the userdata parameter of lua_Writer.
  */
-typedef struct s_buffer {
+typedef struct s_sglua_buffer {
   char* data;
   size_t size;
   size_t capacity;
-} s_buffer_t, *buffer_t;
+} s_sglua_buffer_t, *sglua_buffer_t;
 
 const char* sglua_tostring(lua_State* L, int index);
 const char* sglua_keyvalue_tostring(lua_State* L, int key_index, int value_index);
 void sglua_stack_dump(const char *msg, lua_State* L);
 const char* sglua_get_spaces(int length);
 int sglua_memory_writer(lua_State* L, const void* source, size_t size, void* userdata);
+
+#endif  /* LUA_UTILS_H */