Re: g_strsplit



On Wed, 2005-10-05 at 09:10, Alan M. Evans wrote:
  /* throw away GLib array bookkeeping - keep only array data */
  sarray = (gchar**)parray->pdata;
  g_ptr_array_free(parray,FALSE);

Come to think of it, g_ptr_array_free returns the pdata pointer.

  sarray = g_ptr_array_free(parray,FALSE);

is better, as it is not only marginally more effecient, but also less
chummy with the GPtrArray implementation.

-- 
Alan M. Evans <ame1 extratech com>




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