Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove features marked with DEPRECATED_v321.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 25 Jun 2018 09:10:16 +0000 (11:10 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 25 Jun 2018 09:10:16 +0000 (11:10 +0200)
doc/Doxyfile.in
include/simgrid/s4u/Link.hpp
include/xbt/base.h
include/xbt/dict.h
src/s4u/s4u_Link.cpp
src/xbt/dict.cpp
src/xbt/dict_cursor.c

index 4f86868..edbd796 100644 (file)
@@ -1461,7 +1461,6 @@ PREDEFINED             = XBT_PUBLIC= \
                          XBT_PUBLIC_DATA=extern \
                          XBT_INLINE= \
                         XBT_PRIVATE= \
                          XBT_PUBLIC_DATA=extern \
                          XBT_INLINE= \
                         XBT_PRIVATE= \
-                         XBT_ATTRIB_DEPRECATED_v321(m)= \
                          XBT_ATTRIB_DEPRECATED_v322(m)= \
                          XBT_ATTRIB_DEPRECATED_v323(m)=
 
                          XBT_ATTRIB_DEPRECATED_v322(m)= \
                          XBT_ATTRIB_DEPRECATED_v323(m)=
 
index fd39b35..e1832a8 100644 (file)
@@ -94,7 +94,6 @@ public:
   static simgrid::xbt::signal<void(kernel::resource::NetworkAction*)> on_communication_state_change;
 
   // Deprecated methods
   static simgrid::xbt::signal<void(kernel::resource::NetworkAction*)> on_communication_state_change;
 
   // Deprecated methods
-  XBT_ATTRIB_DEPRECATED_v321("Use get_cname(): v3.21 will turn this warning into an error.") const char* name();
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::by_name()") static Link* byName(const char* name) { return by_name(name); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_name()") const std::string& getName() const { return get_name(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_cname()") const char* getCname() const { return get_cname(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::by_name()") static Link* byName(const char* name) { return by_name(name); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_name()") const std::string& getName() const { return get_name(); }
   XBT_ATTRIB_DEPRECATED_v323("Please use Link::get_cname()") const char* getCname() const { return get_cname(); }
index 34e588f..53f71a3 100644 (file)
@@ -71,7 +71,6 @@
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
-#define XBT_ATTRIB_DEPRECATED_v321(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.21 */
 #define XBT_ATTRIB_DEPRECATED_v322(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.22 */
 #define XBT_ATTRIB_DEPRECATED_v323(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.23)") /* Will be dropped in v3.23 */
 #define XBT_ATTRIB_DEPRECATED_v322(mesg) XBT_ATTRIB_DEPRECATED(mesg) /* Will be dropped in v3.22 */
 #define XBT_ATTRIB_DEPRECATED_v323(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped in v3.23)") /* Will be dropped in v3.23 */
index a4623bf..3eeca4d 100644 (file)
@@ -73,19 +73,13 @@ XBT_PUBLIC void xbt_dict_set(xbt_dict_t dict, const char* key, void* data, void_
 XBT_PUBLIC void* xbt_dict_get(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void* xbt_dict_get_or_null(xbt_dict_t dict, const char* key);
 XBT_PUBLIC char* xbt_dict_get_key(xbt_dict_t dict, const void* data);
 XBT_PUBLIC void* xbt_dict_get(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void* xbt_dict_get_or_null(xbt_dict_t dict, const char* key);
 XBT_PUBLIC char* xbt_dict_get_key(xbt_dict_t dict, const void* data);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    char* xbt_dict_get_elm_key(xbt_dictelm_t elem);
 XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm(xbt_dict_t dict, const char* key);
 XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm_or_null(xbt_dict_t dict, const char* key);
 
 XBT_PUBLIC void xbt_dict_remove(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void xbt_dict_reset(xbt_dict_t dict);
 XBT_PUBLIC int xbt_dict_length(xbt_dict_t dict);
 XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm(xbt_dict_t dict, const char* key);
 XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm_or_null(xbt_dict_t dict, const char* key);
 
 XBT_PUBLIC void xbt_dict_remove(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void xbt_dict_reset(xbt_dict_t dict);
 XBT_PUBLIC int xbt_dict_length(xbt_dict_t dict);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    void xbt_dict_dump_output_string(void* s);
 XBT_PUBLIC void xbt_dict_dump(xbt_dict_t dict, void (*output)(void*));
 XBT_PUBLIC void xbt_dict_dump(xbt_dict_t dict, void (*output)(void*));
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    void xbt_dict_dump_sizes(xbt_dict_t dict);
 XBT_PUBLIC int xbt_dict_is_empty(xbt_dict_t dict);
 
 /** @} */
 XBT_PUBLIC int xbt_dict_is_empty(xbt_dict_t dict);
 
 /** @} */
@@ -143,8 +137,6 @@ XBT_PUBLIC void xbt_dict_cursor_rewind(xbt_dict_cursor_t cursor);
 
 XBT_PUBLIC char* xbt_dict_cursor_get_key(xbt_dict_cursor_t cursor);
 XBT_PUBLIC void* xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor);
 
 XBT_PUBLIC char* xbt_dict_cursor_get_key(xbt_dict_cursor_t cursor);
 XBT_PUBLIC void* xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor);
-XBT_ATTRIB_DEPRECATED_v321("xbt_dict is dying. v3.21 will turn this warning into an error.") XBT_PUBLIC
-    void xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor, void* data, void_f_pvoid_t free_ctn);
 
 XBT_PUBLIC void xbt_dict_cursor_first(const xbt_dict_t dict, xbt_dict_cursor_t* cursor);
 XBT_PUBLIC void xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
 
 XBT_PUBLIC void xbt_dict_cursor_first(const xbt_dict_t dict, xbt_dict_cursor_t* cursor);
 XBT_PUBLIC void xbt_dict_cursor_step(xbt_dict_cursor_t cursor);
index bf07bfd..a49d92d 100644 (file)
@@ -43,10 +43,6 @@ const char* Link::get_cname() const
 {
   return this->pimpl_->get_cname();
 }
 {
   return this->pimpl_->get_cname();
 }
-const char* Link::name()
-{
-  return get_cname();
-}
 bool Link::is_used()
 {
   return this->pimpl_->is_used();
 bool Link::is_used()
 {
   return this->pimpl_->is_used();
index d4c7af3..ce4cc7b 100644 (file)
@@ -246,12 +246,6 @@ char *xbt_dict_get_key(xbt_dict_t dict, const void *data)
   return nullptr;
 }
 
   return nullptr;
 }
 
-/** @brief retrieve the key associated to that xbt_dictelm_t. */
-char *xbt_dict_get_elm_key(xbt_dictelm_t elm)
-{
-  return elm->key;
-}
-
 /**
  * \brief Retrieve data from the dict (null-terminated key)
  *
 /**
  * \brief Retrieve data from the dict (null-terminated key)
  *
@@ -394,12 +388,6 @@ int xbt_dict_length(xbt_dict_t dict)
   return dict->count;
 }
 
   return dict->count;
 }
 
-/** @brief function to be used in xbt_dict_dump as long as the stored values are strings */
-void xbt_dict_dump_output_string(void *s)
-{
-  fputs((char*) s, stdout);
-}
-
 /**
  * \brief test if the dict is empty or not
  */
 /**
  * \brief test if the dict is empty or not
  */
@@ -442,63 +430,6 @@ void xbt_dict_dump(xbt_dict_t dict, void_f_pvoid_t output)
   }
 }
 
   }
 }
 
-xbt_dynar_t all_sizes = nullptr;
-/** @brief shows some debugging info about the bucklet repartition */
-void xbt_dict_dump_sizes(xbt_dict_t dict)
-{
-  unsigned int count;
-  unsigned int size;
-
-  printf("Dict %p: %d bucklets, %d used cells (of %d) ", dict, dict->count, dict->fill, dict->table_size);
-
-  if (not dict) {
-    printf("\n");
-    return;
-  }
-  xbt_dynar_t sizes = xbt_dynar_new(sizeof(int), nullptr);
-
-  for (int i = 0; i < dict->table_size; i++) {
-    xbt_dictelm_t element = dict->table[i];
-    size = 0;
-    if (element) {
-      while (element != nullptr) {
-        size++;
-        element = element->next;
-      }
-    }
-    if (xbt_dynar_length(sizes) <= size) {
-      int prevsize = 1;
-      xbt_dynar_set(sizes, size, &prevsize);
-    } else {
-      int prevsize;
-      xbt_dynar_get_cpy(sizes, size, &prevsize);
-      prevsize++;
-      xbt_dynar_set(sizes, size, &prevsize);
-    }
-  }
-  if (not all_sizes)
-    all_sizes = xbt_dynar_new(sizeof(int), nullptr);
-
-  xbt_dynar_foreach(sizes, count, size) {
-    /* Copy values of this one into all_sizes */
-    int prevcount;
-    if (xbt_dynar_length(all_sizes) <= count) {
-      prevcount = size;
-      xbt_dynar_set(all_sizes, count, &prevcount);
-    } else {
-      xbt_dynar_get_cpy(all_sizes, count, &prevcount);
-      prevcount += size;
-      xbt_dynar_set(all_sizes, count, &prevcount);
-    }
-
-    /* Report current sizes */
-    if (count != 0 && size != 0)
-      printf("%uelm x %u cells; ", count, size);
-  }
-  printf("\n");
-  xbt_dynar_free(&sizes);
-}
-
 /**
  * Create the dict mallocators.
  * This is an internal XBT function called during the lib initialization.
 /**
  * Create the dict mallocators.
  * This is an internal XBT function called during the lib initialization.
@@ -521,24 +452,6 @@ void xbt_dict_postexit()
     xbt_mallocator_free(dict_elm_mallocator);
     dict_elm_mallocator = nullptr;
   }
     xbt_mallocator_free(dict_elm_mallocator);
     dict_elm_mallocator = nullptr;
   }
-  if (all_sizes) {
-    unsigned int count;
-    int size;
-    double avg = 0;
-    int total_count = 0;
-    printf("Overall stats:");
-    xbt_dynar_foreach(all_sizes, count, size) {
-      if (count != 0 && size != 0) {
-        printf("%uelm x %d cells; ", count, size);
-        avg += count * size;
-        total_count += size;
-      }
-    }
-    if (total_count > 0)
-      printf("; %f elm per cell\n", avg / (double)total_count);
-    else
-      printf("; 0 elm per cell\n");
-  }
 }
 
 #ifdef SIMGRID_TEST
 }
 
 #ifdef SIMGRID_TEST
index f6b6a3d..b528645 100644 (file)
@@ -164,15 +164,3 @@ inline void *xbt_dict_cursor_get_data(xbt_dict_cursor_t cursor)
 
   return cursor->current->content;
 }
 
   return cursor->current->content;
 }
-
-/**
- * @brief Set current data
- * @param cursor the cursor
- * @param data the new data
- * @param free_ctn unused parameter (kept for compatibility)
- */
-inline void xbt_dict_cursor_set_data(xbt_dict_cursor_t cursor, void* data, XBT_ATTRIB_UNUSED void_f_pvoid_t free_ctn)
-{
-  __cursor_not_null(cursor);
-  xbt_dictelm_set_data(cursor->dict, cursor->current, data);
-}