Re: [PATCH] gdk/gdkpixmap.[ch]: state constness of `data` in create pixmap routines



> The public interface for the following routines are affected by the
> patch, however this should not affect any software calling into the GDK
> library.

What do you build that assertion on?

Have a look at the program below.  With "const", the
second "foo" call causes gcc to complain over types.

Also, code assigning the address of any of the affected
functions to variables will become invalid.

Morten



static void
foo (const char **x, int n)
{
  const char *y = x[0];
  (void)y;
}



int
main (int argc, char **argv)
{
  const char *x1;
  foo (&x1, 1);

  char *x2;
  foo (&x2, 1);

  return 0;
}


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