Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
New function gras_msgtype_get_name()
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 24 Jun 2010 09:17:49 +0000 (09:17 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 24 Jun 2010 09:17:49 +0000 (09:17 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7929 48e7efb5-ca39-0410-a469-dd3cf9ba447f

ChangeLog
include/gras/messages.h
src/gras/Msg/gras_msg_types.c

index f033707..8061f69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,9 @@ SimGrid (3.5) unstable; urgency=low
      code (even before the xbt_init / MSG_init)
    - xbt_exit is now a no-op and produce a warning when used.
 
+ GRAS:
+ * New function: gras_msgtype_get_name()
+
  Build chain: bug fixes and further polishing
  * Fix the 'make install' target. 
    No need to use 'make install-simgrid' anymore
index a21e58e..dd49e2c 100644 (file)
@@ -70,6 +70,7 @@ XBT_PUBLIC(gras_msgtype_t) gras_msgtype_by_name_or_null(const char *name);
 XBT_PUBLIC(gras_msgtype_t) gras_msgtype_by_namev(const char *name,
                                                  short int version);
 XBT_PUBLIC(gras_msgtype_t) gras_msgtype_by_id(int id);
+XBT_PUBLIC(const char*) gras_msgtype_get_name(gras_msgtype_t type);
 
 XBT_PUBLIC(void) gras_msgtype_dumpall(void);
 
index 0511544..0ea75e4 100644 (file)
@@ -213,6 +213,13 @@ gras_msgtype_t gras_msgtype_by_id(int id)
   return (gras_msgtype_t) xbt_set_get_by_id(_gras_msgtype_set, id);
 }
 
+/* ******************************************************************** */
+/*                         GETTERS                                      */
+/* ******************************************************************** */
+
+XBT_INLINE const char* gras_msgtype_get_name(gras_msgtype_t type) {
+  return type->name;
+}
 
 
 /* ******************************************************************** */