Marcus Sundberg wrote:

>> const ggi_directbuffer *dbuf;
>> /* Acquire DirectBuffer before we use it. */
>> if (ggiResourceAcquire(dbuf->resource, GGI_ACTYPE_WRITE) != 0) {
>>         fail("Error acquiring DirectBuffer\n");
>> }
>> this cannot work. if ggi_directbuffer is const, and
>> ggiResourceAcquire wants a non-const ggi_resource_t my compiler
>> kicks me.
>What compiler is that? Sounds like a broken compiler to me.
>dbuf->resource is a pointer, and the fact that dbuf is a const *
>shouldn't affect the type of dbuf->resource afaik.

dbuf is a pointer to a const ggi_directbuffer, i.e. it is not allowed to
modify the contents of the object *it points to*. That means it's illegal
to change the value of dbuf->resource


Drive A: not responding...Formatting C: instead

Reply via email to