[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Use GLib allocation in the audio subsystem.
From: |
Bohdan R . Rau |
Subject: |
[PATCH 2/2] Use GLib allocation in the audio subsystem. |
Date: |
Tue, 05 Oct 2010 14:29:12 +0200 |
On Tue, 5 Oct 2010 14:04:13 +0200, Halim Sahin <halim.sahin at t-online.de>
wrote:
> Hi Hynek,
> I am fine with your opinion except one litle thing:
> Glib is a bad dependency if you don't use a whole desktop but want to
> use speechd in plain consoles.
> Building small environments will install a lot of deps when using
glib(eg.
> gtk).
Glib does not imply GTK. Good example: very popular mc - I have installed
mc on all my servers and none of them has gtk installed.
>
> Unfortunately glib is in use on many places in the speechd code so it
> would take a lot of time to refactor these parts.
I don't agree.
We use only very small subset of glib, and there should be no problem to
write these functions from scratch, and then replace all "g_" prefixes with
"spd_" (or something).
For example:
void spd_free(void *arg)
{
if (arg) free(arg);
}
char *spd_string_free(SPDString *string, int freestr)
{
char *rv=freestr?NULL:string->str;
spd_free(rv);
spd_free(string);
return rv;
}
It may be done with single patch. And refactoring the code may be done
with simple python (or even bash/sed) script.
Also, we can keep compatibility between our and libc functions (especially
malloc, realloc and free) to be compatible with external libraries.
Also - we can optimize these function (especially string and array
functions) for typical (in speech-dispatcher) usage...
ethanak
--
http://milena.polip.com/ - Pa pa, Ivonko!
- [PATCH 1/2] Fix memory allocation in the common library., Christopher Brannon, 2010/10/02
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Christopher Brannon, 2010/10/02
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Boris Dusek, 2010/10/02
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Christopher Brannon, 2010/10/02
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Boris Dusek, 2010/10/03
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Andrei Kholodnyi, 2010/10/04
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Hynek Hanke, 2010/10/05
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Halim Sahin, 2010/10/05
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Rui Batista, 2010/10/05
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Christopher Brannon, 2010/10/05
- [PATCH 2/2] Use GLib allocation in the audio subsystem.,
Bohdan R . Rau <=
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Halim Sahin, 2010/10/05
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Boris Dusek, 2010/10/05
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Steve Holmes, 2010/10/06
- [PATCH 2/2] Use GLib allocation in the audio subsystem., Christopher Brannon, 2010/10/06