Re: [patch] constify g_simple_async_result_set_from_error

> With this change, it won't break (or add warnings) to any program. It
> just removes a warning for programs that do not do the explicit cast,
> and get given a const GError.


Take the program below and notice that the constified prototype
introduces a warning.  If used from C++, that would be an error.

So this change is an API break.  That is not to say that it might
not be justified, but let's call it what it is.


static void foo (const char *s) { (void)s; }
static void bar (      char *s) { (void)s; }

main (int argc, char **argv)
  void (*f1) (char *) = foo;
  void (*f2) (char *) = bar;

  f1 ("");
  f2 ("");

  return 0;

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