Re: Gtk+ print support - request for feedback
- From: Alexander Larsson <alexl redhat com>
- To: Michael Sweet <mike easysw com>
- Cc: till kamppeter gmx net, "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Re: Gtk+ print support - request for feedback
- Date: Mon, 06 Mar 2006 15:49:51 +0100
On Mon, 2006-03-06 at 08:14 -0500, Michael Sweet wrote:
> Alexander Larsson wrote:
> > On Sat, 2006-03-04 at 12:27 -0500, Michael Sweet wrote:
> >
> >> ppd_text_to_utf8() leaks memory for UTF-8 encoded text - you can
> >> set encoding to a constant string there, too!
> >
> > I don't see the leak. It just returns a strdup of the passed in text
> > (which is supposed to be freed by callers).
>
> OK, so then you'll crash when the caller tries to free the constant
> strings you are returning?!?
Eh? I return either:
return g_strdup (text);
or:
res = g_strdup ("???");
or:
res = g_convert (text, -1, "UTF-8", encoding, NULL, NULL, NULL);
return res;
Neither is a constant string.
> OK, sounds reasonable, but I predict that users will be asking why
> they can't see those options... :)
We'll just have to make sure the system print admin dialog is easy to
use and easy to find.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a sword-wielding drug-addicted vagrant who hangs with the wrong crowd.
She's a scantily clad Bolivian wrestler with someone else's memories. They
fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]