Difference for common/shstr.c from version 1.5 to 1.6


version 1.5 version 1.6
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_shstr_c =   * static char *rcsid_shstr_c =
  *   "$Id: shstr.c,v 1.5 2005/08/12 08:18:59 ryo_saeba Exp $";   *   "$Id: shstr.c,v 1.6 2005/08/12 13:46:34 ryo_saeba Exp $";
  *   *
  * shstr.c   * shstr.c
  *   *
Line 103
 
Line 103
  *      - pointer to string identical to str   *      - pointer to string identical to str
  */   */
   
 char *  const char *
 add_string(const char *str) {  add_string(const char *str) {
     shared_string *ss;      shared_string *ss;
     int ind;      int ind;
Line 197
 
Line 197
  *      - str   *      - str
  */   */
   
 char *  const char *
 add_refcount(char *str) {  add_refcount(const char *str) {
     GATHER(add_ref_stats.calls);      GATHER(add_ref_stats.calls);
     ++(SS(str)->refcount);      ++(SS(str)->refcount);
     /* This function should be declared       /* This function should be declared
      *    const char *add_refcount(const char *)       *    const char *add_refcount(const char *)
      * Unfortunately, that would require changing a lot of structs       * Unfortunately, that would require changing a lot of structs
        *
        *   Yup, many changes, but may have make some bugs more visible :)
        *   -- Ryo 2005-08-12
      */       */
     return str;      return (char*)str;
 }  }
   
 /*  /*
Line 229
 
Line 232
  *      - pointer to identical string or NULL   *      - pointer to identical string or NULL
  */   */
   
 char *  const char *
 find_string(const char *str) {  find_string(const char *str) {
     shared_string *ss;      shared_string *ss;
     int ind;      int ind;
Line 276
 
Line 279
  */   */
   
 void  void
 free_string(char *str) {  free_string(const char *str) {
     shared_string *ss;      shared_string *ss;
   
     GATHER(free_stats.calls);      GATHER(free_stats.calls);
Line 356
 
Line 359
  *      - a string or NULL   *      - a string or NULL
  */   */
   
 char *  const char *
 ss_dump_table(int what) {  ss_dump_table(int what) {
     static char totals[80];      static char totals[80];
     int entries = 0, refs = 0, links = 0;      int entries = 0, refs = 0, links = 0;


Legend:
line(s) removed in v.1.5 
line(s) changed
 line(s) added in v.1.6

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:18