Re: RFC: String cleanup



Hi Daniel,

Daniel Marjamäki schrieb:
> Hello friends!
> 
> I'm new to GTK, and would like to contribute. I have an idea for what I can do...
> 
> Changing from:
>   [const] char *str
> to:
>   [const] char str[]
> is often (but not always) a good idea because the latter is a more direct approach, saving both cpu and memory.

sorry for the question. But why is writing
  const gchar str[]="test";
better than
  const gchar *str="test";
? Any links/sources?

Stefan

> 
> There are lots of places in GTK where I could make this change.
> 
> Any comments?
> 
> Best regards,
> Daniel Marjamäki
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




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