Geoff Hutchison wrote:
> 
> * No longer using HtPack on the word DB: Somehow I'm not getting what I put
> in. I put in sizeof(WordRecord) = 20 and get back 16. I don't know enough
> about how they work,
I thing it's something about class and structure .I don't have an old
htdig version (or the one I have doesn't have htPack) so I can't be
sure, but sizeof(struct WordRecord) is 16 bytes for 4 ints ==> the u4 in
the htPack sheme, but sizeof(class WordRecord) is 20 ('this' pointer
added). Anyway it doesn't look like a good idea to save the 'this'
pointer . What is better?
- use a structure for data in WordRecord and use it to save and restore
record.
- use the serialize, deserialize stuff.

Didier

------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to