ext Brian J. Tarricone wrote:
Now, that's for C. For C++ passing a const pointer to a function
expecting a non-const pointer actually a hard *error*[1]. So the API
couldn't be changed in this way without likely breaking any C++
application that uses these glib data structures.
Yes, but this
BJörn Lindqvist wrote:
On Thu, Jul 3, 2008 at 3:49 PM, Alberto Mardegan
<[EMAIL PROTECTED]> wrote:
ext Havoc Pennington wrote:
Whether you agree or not, the GLib types don't use const in their API,
so if you try to use const yourself on these types you're just signing
up for pain. It won't work
Keith Williams wrote:
Hello:
I am building for an GTK+2.12.10 for an embedded ARM Linux system
through Scratchbox. Previously, I've been able to get everything to
build (along with applications). Yesterday, I upgraded DirectFB and
needed to rebuild GTK and the applications (they were stil
On Thu, Jul 3, 2008 at 3:49 PM, Alberto Mardegan
<[EMAIL PROTECTED]> wrote:
> ext Havoc Pennington wrote:
>> Whether you agree or not, the GLib types don't use const in their API,
>> so if you try to use const yourself on these types you're just signing
>> up for pain. It won't work well or do anyt
Hello:
I am building for an GTK+2.12.10 for an embedded ARM Linux system
through Scratchbox. Previously, I've been able to get everything to
build (along with applications). Yesterday, I upgraded DirectFB and
needed to rebuild GTK and the applications (they were still linked to
the old Di
Havoc Pennington wrote:
I'm not a GTK maintainer, but one problem with this is backward
compatibility. Adding const can certainly break previously-working
code, especially C++ code.
This was an issued once faced when people migrated from K&R C to ANSI C.
Nothing wrong with having a gconst t
Hi,
On Thu, Jul 3, 2008 at 9:49 AM, Alberto Mardegan
<[EMAIL PROTECTED]> wrote:
> If I proposed a patch which adds some "const" here and there, would that be
> discarded a priori, or would it undergo a serious consideration?
>
I'm not a GTK maintainer, but one problem with this is backward
compat
Morten Welinder wrote:
"const" in C does not propagate as usefully as you would like. Therefore,
the following sniplet is not violating C rules:
struct Foo { int *x; };
int foo (const struct Foo *p) { *(p->x) = 1; }
I don't think most languages propagate a "const"-like type. However, at
lea
ext Havoc Pennington wrote:
Hi,
This is in the archives a bunch of times, for example the first google
hit I got was
http://mail.gnome.org/archives/gtk-devel-list/2001-May/msg00485.html
Ah, sorry, I only researched about GHashTable.
Whether you agree or not, the GLib types don't use const in
Hi,
This is in the archives a bunch of times, for example the first google
hit I got was
http://mail.gnome.org/archives/gtk-devel-list/2001-May/msg00485.html
Whether you agree or not, the GLib types don't use const in their API,
so if you try to use const yourself on these types you're just signi
>> Because const in C is crippled, unlike in C++ where its actually useful.
>>
>
> Soory, but you aren't right:
Yes, he is, but you did not understand him. He was making a language
comment, not an implementation comment.
"const" in C does not propagate as usefully as you would like. Therefore,
On Thu, Jul 3, 2008 at 2:34 PM, Ross Burton <[EMAIL PROTECTED]> wrote:
> On Thu, 2008-07-03 at 14:21 +0300, Andrew W. Nosenko wrote:
>> On Thu, Jul 3, 2008 at 2:11 PM, Rui Tiago Cação Matos
>> <[EMAIL PROTECTED]> wrote:
>> > On 03/07/2008, Alberto Mardegan <[EMAIL PROTECTED]> wrote:
>> >> Hi, quick
On Thu, 2008-07-03 at 14:21 +0300, Andrew W. Nosenko wrote:
> On Thu, Jul 3, 2008 at 2:11 PM, Rui Tiago Cação Matos
> <[EMAIL PROTECTED]> wrote:
> > On 03/07/2008, Alberto Mardegan <[EMAIL PROTECTED]> wrote:
> >> Hi, quick question: why do methods like
> >>
> >> g_hash_table_size()
> >> g_hash_ta
On Thu, Jul 3, 2008 at 2:11 PM, Rui Tiago Cação Matos
<[EMAIL PROTECTED]> wrote:
> On 03/07/2008, Alberto Mardegan <[EMAIL PROTECTED]> wrote:
>> Hi, quick question: why do methods like
>>
>> g_hash_table_size()
>> g_hash_table_lookup()
>>
>> don't accept a "_const_ GHashTable *" as first paramet
On 03/07/2008, Alberto Mardegan <[EMAIL PROTECTED]> wrote:
> Hi, quick question: why do methods like
>
> g_hash_table_size()
> g_hash_table_lookup()
>
> don't accept a "_const_ GHashTable *" as first parameter?
Since GHashTable is an opaque data type you don't have to worry about it.
Rui
_
Hi, quick question: why do methods like
g_hash_table_size()
g_hash_table_lookup()
don't accept a "_const_ GHashTable *" as first parameter?
TIA,
Alberto
--
http://www.mardy.it <-- Geek in un lingua international!
___
gtk-devel-list mailing list
gtk
16 matches
Mail list logo