[AD] install_allegro with NULL for atexit_ptr

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2001-11-27, Eric Botcazou <ebotcazou@xxxxxxxxxx> wrote:
> > It's not so nice, but we have an existing solution: use
> > `install_allegro' with a dummy function for `atexit'.  We could do as
> > Javier suggests, i.e. change how `install_allegro' interprets NULL for
> > atexit parameter.  (At the time I thought we were in a deeper freeze
> > than we actually are, so I rejected it.)
> 
> Is there any drawback to this solution ?

Not really. (Javier will want to kill me now..)

This was committed (untested ;)


diff -u -r1.30 allegro.c
--- allegro.c   2001/11/06 15:30:46     1.30
+++ allegro.c   2001/11/29 05:51:33
@@ -362,8 +362,6 @@
    if (_allegro_count == 0) {
       if (atexit_ptr)
         atexit_ptr(allegro_exit);
-      else
-        atexit(allegro_exit);
    }
 
    _allegro_count++;

    
.. and documented.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/