Svante Signell, le Mon 16 Apr 2012 18:07:54 +0200, a écrit :
> No, doesn't look like it (from the ChangeLog):

Ok.

> > > Problem with the patch is that the allocated string cannot easily be
> > > freed:
> > 
> > You mean the string allocated in getCurrentExecutablePath()?  It's fine
> > to keep it allocated all the time. Just make sure to store the pointer
> > in a static variable, to be able to reuse the buffer next time the
> > function is called.
> 
> Adding static to the CString definition or adding static when
> allocating, like: static CString path = getCurrentExecutablePath();

No, I mean *inside* getCurrentExecutablePath. There used to be a static
PATH_MAX char array; make it a static char * that gets reused each time.

Samuel


-- 
To UNSUBSCRIBE, email to debian-hurd-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120416172148.gq4...@type.bordeaux.inria.fr

Reply via email to