Re: [gtk-list] Re: Why g_print ?
- From: Tim Janik <timj psynet net>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Why g_print ?
- Date: Thu, 31 Jul 1997 13:50:56 +0200 (CEST)
On Thu, 31 Jul 1997, Werner Koch wrote:
> On Thu, Jul 31, 1997 at 04:38:13AM +0200, Tim Janik wrote:
> > regarding g_malloc(), g_free() and siblings, these functions are much safer
> > than thier libc equivalences. e.g. g_free() just returns if called with
> > NULL, i even rely on that behaviour in my apps.
> ^^^^^
> That's required by Standard C, see also free(3).
yup, you are right!
change the example to something like: e.g. g_malloc() always returns a pointer
to the allocated space, because g_error() is called if the request fails.
so the common programmer fault of not checking the return value of the
*alloc functions is avoided.
> Werner
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]