Re: [AD] constness in ugetx()

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


Oops, I've just found out what you meant, and I don't understand
why it's causing a problem. :(  I might have to give in to Shawn
and agree that `const' is broken!

Basically, in this function:

    void func (char *a, char **b)
    {
        const char *x = a;
        const char **y = b;
    }

The second assignment produces an error.  To me it seems
fundamentally wrong that it would do this -- it's like saying
that a pointer-to-(char) is fundamentally different to a
pointer-to-(pointer-to-char).  I don't think the pointed-to type
should affect the nature of the pointer though, especially not
its const-ness.

George

-- 
Random project update:
22/06/2000: AllegroGL documentation:  http://allegrogl.sourceforge.net/
        See under `Documentation' for the AllegroGL Reference Manual in
        various formats.



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