From: Christophe ThiƩry Date: Thu, 29 Sep 2011 12:16:58 +0000 (+0200) Subject: Rename s_buffer_t to s_sglua_buffer_t X-Git-Tag: exp_20120216~558^2~15^2~7 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/62cd7d2d579e6b8ee4893728e853bfc8694dcc46 Rename s_buffer_t to s_sglua_buffer_t --- diff --git a/src/bindings/lua/lua_utils.c b/src/bindings/lua/lua_utils.c index 55721bc7c4..50b37eed97 100644 --- a/src/bindings/lua/lua_utils.c +++ b/src/bindings/lua/lua_utils.c @@ -140,7 +140,6 @@ void sglua_stack_dump(const char* msg, lua_State* L) * * This function is a valid lua_Writer that writes into a memory buffer passed * as userdata. - * TODO: use a dynar as userdata * * @param L a lua state * @param source some data @@ -150,7 +149,7 @@ void sglua_stack_dump(const char* msg, lua_State* L) int sglua_memory_writer(lua_State* L, const void* source, size_t size, void* userdata) { - buffer_t buffer = (buffer_t) userdata; + sglua_buffer_t buffer = (sglua_buffer_t) userdata; while (buffer->capacity < buffer->size + size) { buffer->capacity *= 2; buffer->data = xbt_realloc(buffer->data, buffer->capacity); diff --git a/src/bindings/lua/lua_utils.h b/src/bindings/lua/lua_utils.h index b36e217d6e..49f8e4d729 100644 --- a/src/bindings/lua/lua_utils.h +++ b/src/bindings/lua/lua_utils.h @@ -11,13 +11,13 @@ /** * @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);