|
|
|
|
|
by Joker_vD
44 days ago
|
|
The language kinda forces one to use void pointers, as the path of the least resistance. I've seen your implementation of type-safe containers and it's a lot more effort (and requires rather recent version of C) than simply having a pointer-to-void as the payload. Although GLib indeed has some rather weird design/taste. > and why is it called gpointer? An untyped pointer, exactly equivalent to void*.
The standard C void* type should usually be preferred in new code, but gpointer
can be used in contexts where a type name must be a single word, such as in the
GType name of G_TYPE_POINTER or when generating a family of function names for
multiple types using macros.
Hey, they do have type-generating facilities! They just don't use them to template their containers. It's a very, very old library, it predates C99. |
|