Diff for /qemu/qstring.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 18:23:06 version 1.1.1.3, 2018/04/24 19:16:35
Line 40  QString *qstring_from_substr(const char  Line 40  QString *qstring_from_substr(const char 
 {  {
     QString *qstring;      QString *qstring;
   
     qstring = qemu_malloc(sizeof(*qstring));      qstring = g_malloc(sizeof(*qstring));
   
     qstring->length = end - start + 1;      qstring->length = end - start + 1;
     qstring->capacity = qstring->length;      qstring->capacity = qstring->length;
   
     qstring->string = qemu_malloc(qstring->capacity + 1);      qstring->string = g_malloc(qstring->capacity + 1);
     memcpy(qstring->string, str + start, qstring->length);      memcpy(qstring->string, str + start, qstring->length);
     qstring->string[qstring->length] = 0;      qstring->string[qstring->length] = 0;
   
Line 70  static void capacity_increase(QString *q Line 70  static void capacity_increase(QString *q
         qstring->capacity += len;          qstring->capacity += len;
         qstring->capacity *= 2; /* use exponential growth */          qstring->capacity *= 2; /* use exponential growth */
   
         qstring->string = qemu_realloc(qstring->string, qstring->capacity + 1);          qstring->string = g_realloc(qstring->string, qstring->capacity + 1);
     }      }
 }  }
   
Line 136  static void qstring_destroy_obj(QObject  Line 136  static void qstring_destroy_obj(QObject 
   
     assert(obj != NULL);      assert(obj != NULL);
     qs = qobject_to_qstring(obj);      qs = qobject_to_qstring(obj);
     qemu_free(qs->string);      g_free(qs->string);
     qemu_free(qs);      g_free(qs);
 }  }

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com