On 2013/01/16 14:42, Denis Krjuchkov <de...@crazydev.net> wrote:
> What would map_uri_fs() look like?
> We are gived UTF-8 URI and need to return std::string-based type.
> First we call character conversion routine. This allocates some memory.
> Then we copy the result to our std::string-wrapper (aka Path).
> This employs additional copying, don't it?
> Finally we free the our char* buffer and return Path.

I guess you can convert right into the std::string, can't you?

(Maybe GLib cannot, but I mean technically it is possible.)

> >But it's even easier; with my idea, you don't need to transfer
> >ownership at all.  Let some code do the talking:
> 
> Well this is exactly what I've proposed from start of our discussion
> (starting from "Some bonus thoughts").
> And you initially disagreed with it.

Ok, I may have misunderstood/misread.  I thought you were keeping
path_fs as it is, and only convert to OS encoding when a syscall is
invoked.

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to