glib/gdataset.c (quarky / stringy stuff)



Hi guys - please forgive me if this isn't the right mailing list for glib questions. I'd like to ask a question about a recent change in 'glib/gdataset.c'. Up until a week or so ago, the code around line 1031 looked like this:-

      if (strcmp (g_quark_to_string (data->key), key) == 0)
      {
        res = data->data;
        break;
      }

Some time in the dim and distant past (to fix a problem which I can't remember any more) I changed my local copy to look like this:-

if (g_quark_to_string (data->key) != 0) /* This line added by me !!! */
        if (strcmp (g_quark_to_string (data->key), key) == 0)
        {
          res = data->data;
          break;
        }

but after an update this morning I noticed that the official code has recently been changed to this:-

        if (g_strcmp0 (g_quark_to_string (data->key), key) == 0)
        {
          res = data->data;
          break;
        }

Is that change effectively equivalent to what I did locally? If so, I can abandon my extra line and go back to using the official version. Thanks.

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]