GLib on Solaris
- From: Max Avramenko <max_avramenko yahoo com>
- To: gtk-devel-list redhat com
- Subject: GLib on Solaris
- Date: Wed, 3 May 2000 08:08:08 -0700 (PDT)
Dear all
I am writing to you because it looks like you're
supporting GLib project and I wanted to ask couple of
questions. I currently built GLib on Solaris 2.5.1
using Sun's 4.2.2 compiler. I had to do a lot of
tweaking to achieve the compilation. In particular
there ar emany places in the code where type
conversion operators are not being used and compiler
refuses to do it implicetly. For example, code like
this:
char * cp = gpointer <some pointer> does not compile.
Usually I explicetely cast like this:
char * cp = (char *) <gpointer type pointer>
Or there is code that implicetely converts from
gpointer to gointer * like this:
gpointer * gp = <gpointer type pointer> so I had to
put conversion operators like (gpointer *).
This type of code could be found all over the place.
My question is this:
is this code intentional or was it a result of
somebody forgetting to put conversion operators? Why
not always make a cast to the pointer type you assign
to?
If you write code like this:
void some_Callback(gpointer p)
{
GList * glp = p;
}
why not write this instead:
void some_Callback(gpointer p)
{
GList * glp = (GList *) p;
}
Max
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]