[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] puzzled....
From: |
root |
Subject: |
[Gcl-devel] puzzled.... |
Date: |
Sun, 25 Apr 2004 12:03:13 -0400 |
in o/object.h (line 350) there is the struct:
struct ustring{
....
unsigned char *ust_self;
....
this appears to be the definition of ust_self, a pointer to a char *array
in gcl-tk/sheader.h (line 109) OBJ_TO_CONNECTION_STATE(x) is defined as
#define OBJ_TO_CONNECTION_STATE(x) \
((struct connection_state *)(void *)((x)->ust.ust_self))
so it appears that OBJ_TO_CONNECTION_STATE accepts a thing of type
ustring and casts the (char *)array to a (connection_state *)array
yet in sockets.c (line 330) the macro is used with an argument:
.... (OBJ_TO_CONNECTION_STATE(fd) .....
where "fd" has been used to indicate the "file descriptor" which
is a fixnum.
Further the buffer it tries to write into needs to be of type ustring.
I have 2 questions:
(a) should sockets.c line 330 read:
... (OBJ_TO_CONNECTION_STATE(sfd) ...
(which means that the argument to the function must change)
(b) how does one allocate a ustring?
Tim
- [Gcl-devel] puzzled....,
root <=