Re: [gtk-list] 1.1.5 g_timer_new bug!



> Hi gtk*,
>     I had a bit of time to look at the uncommented sources
> yesterday :-) some in-source documentation would be nice
> you know... Anyway, I noticed that in 1.1.5 g_timer_new()
> first allocates memory for the new timer 'object' and then
> it simply proceeds to access its members (ptr->something)
> without even checking if the allocation was successful!
> the other g_timer*() functions do have checking with
> assertions but g_timer_new() does NOT.

it uses g_new and that will fail (i.e. exit), if no memory is available,
thus g_new it is guaranteed to return a non NULL value.

> PS. Again, any chance a pause/resume functionality will
>     be added?

sumbit a patch and I'm sure, it will be considered.

Bye,
Sebastian
-- 
+--------------============####################============--------------+
| Sebastian Wilhelmi, Institute for Computer Design and Fault Tolerance, |
| University of Karlsruhe;  Building 20.20, Room 263,  D-76128 Karlsruhe |
| mail: wilhelmi@ira.uka.de;  fax: +49 721 370455;  fon: +49 721 6084353 |
+-----------------> http://goethe.ira.uka.de/~wilhelmi <-----------------+



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