On Sun, Oct 03, 1999 at 10:04:58AM +0200, Norbert Koch wrote:
Hi!
The latest sources fail to build due to ... (my formatting)
elhash.c
..\src\elhash.c(921) : error C2039:
'ui' : is not a member of 'Lisp_Hash_Table'
..\src\elhash.c(47) : see declaration of 'Lisp_Hash_Table'
..\src\elhash.c(922) : error C2039:
'ui' : is not a member of 'Lisp_Hash_Table'
..\src\elhash.c(47) : see declaration of 'Lisp_Hash_Table'
The relevant passage is (function resize_hash_table)
if (XRECORD_LHEADER (ht)->data_dumped)
XRECORD_LHEADER (ht)->data_dumped = 0;
Lisp_Hash_Table doesn't have a member data_dumped (but don't ask me,
why cl is complaining about 'ui' :-)). Is it missing, a typo (ie it
should be 'header'), or is this a leftover from 'old days'?
It has. XRECORD_LHEADER returns a lrecord_header * :
struct lrecord_header
{
/* index into lrecord_implementations_table[] */
unsigned type :8;
/* 1 if the object is marked during GC. */
unsigned mark :1;
/* 1 if the object resides in read-only space */
unsigned c_readonly : 1;
/* 1 if the object is readonly from lisp */
unsigned lisp_readonly : 1;
/* 1 if the object is a dumped one */
unsigned dumped : 1;
/* 1 if the data pointed by the object is dumped */
unsigned data_dumped : 1;
};
Let's see...
#define XRECORD_LHEADER(a) ((struct lrecord_header *) XPNTR (a))
#define XPNTR(x) ((void *) XPNTRVAL(x))
and in lisp-union.h:
# define XPNTRVAL(x) ((x).ui)
It, of course, compiles without a problem is you don't une the union
type.
Looks like I abused the types slightly too much. Oh well, I'll fix
that.
OG.