Wireshark-dev: Re: [Wireshark-dev] [PATCH] Fixup for a segfault with gtk1.2

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Wed, 31 Jan 2007 01:30:25 +0100
Stephen Fisher wrote:
On Tue, Jan 23, 2007 at 12:14:05AM +0100, Sebastien Tandel wrote:

I was wondering whether it couldn't be easier to replace the g_strsplit of gtk1.2 by the one implemented in gtk2. It will be far more easier to avoid problems in the current dissectors and in the future.

Write a new header file (w_strsplit.h) which defines a macro replacing the string g_strsplit by w_strsplit and implements the function as a copy of g_strsplit defined in gtk2. It should be defined only if using gtk1.2 of course ... Include the header w_strplsit.h in each file using g_strsplit ... and the work is done. No more headache !

What do you think?

This is probably the best approach as trying to fix every place the broken g_strsplit occurs (while compiled for GTK1) is very troublesome. If you have time, could you work on a patch to try this out?


The prefix w_ is a bit generic, I would suggest ws_ instead :-)

Regards, ULFL