This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
> > Without having thought through the details, this sounds like a good > > idea to me. However, you'll have 2<<n repeated entries in the smob > > table. Simply enlarging the smob range, but leaving the top eight > > bits or so for flags doesn't have this problem. > > > > If people subtracted off the base smob number, and then masked off > > their bits, it wouldn't be necessary to align the smob numbers. > > Would this cause inconsistencies for applications using independently deviced > modules containing custom smob types each? What I mean is, a module would say TAG = scm_newsmobs(funs, n), and get a range of smob tags, from TAG to TAG + (1 << n) - 1. Then, to examine the n flag bits, that module would say (SCM_CAR (obj) - TAG) & ((1 << n) - 1). To set them you'd have to, um, subtract TAG, frob, and then add back TAG? Kinda clumsy, I guess...