Re: [RFC] Glib::filename_(to|from)_unicode => Glib->filename_(to|from)_unicode?



Marc Lehmann wrote:

On Thu, Jan 08, 2004 at 11:43:50AM +0100, Bjarne Steinsbø <bosteins broadpark no> wrote:
On the other hand, looking at the implementation, they don't seem to do very much (or anything at all),
Well, they convert filenames into the correct format expected by Glib and
Gtk2 (see below, though, for a slightly better explanation, or read the
Glib manpage, they are actually documented).
This, I think, is the relevant extract from Glib.xs from yesterday's anonymous cvs:

=for apidoc __hide__
=cut
const char *
filename_from_unicode (GPerlFilename filename)
       PROTOTYPE: $
       CODE:
       RETVAL = filename;
       OUTPUT:
       RETVAL
=for apidoc __hide__
=cut
GPerlFilename_const
filename_to_unicode (const char *filename)
       PROTOTYPE: $
       CODE:
       RETVAL = filename;
       OUTPUT:
       RETVAL

Ahh, I see. They're doing the conversion using the typemap. Sorry, didn't notice that at first pass.

nor do they have an equivalent in glib.

They are straight interfaces to glib functions, so I don't quite
understand this one :)
I can't find them anywhere in the version of glib (glib-2.3.1) that I'm looking at. There are some glib functions for converting to unicode, but these are called g_filename_to/from_utf8. These are actually the functions called by the typemapping stuff.

I withdraw my request for dropping them, and change that to a request for a name-change instead.

Hmmm. Maybe not. It could easily be argued that they have a suffiently different call signature from the corresponding glib functions that they should be kept separate. For what it's worth: let it be noted that I vote for keeping them as they are, name and all.

What's the point of implementing them at all?

The ability to use filenames in gtk+ (and other libs).
(Rest of a nice explanation deleted)

Sorry, my question was based on my misunderstanding that they did nothing at all.

Bjarne





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