Re: [AD] constness in ugetx() |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
In reply to George Foot (George Foot <gfoot@xxxxxxxxxx>): >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! Something seems to be broken somewhere. Perhaps it is my understanding of `const'; I do not seem to be able to get the compiler to understand what I mean. Taking your example below, > void func (char *a, char **b) > { > const char *x = a; > const char **y = b; > } If I rewrite this as: typedef char** char2ptr; void func(char* a, char** b) { const char* p = a; const char2ptr q = b; } I get no error. I do not have time to test it, but what if we rewrite ugetx() to be: typdef char** allegro_const_pointer_hack; int ugetx(const allegro_const_pointer_hack p); Now what happens? Bye for now, -- Laurence Withers, lwithers@xxxxxxxxxx http://www.lwithers.demon.co.uk/
Attachment:
signature.asc
Description: PGP signature
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |