[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: back-config, overlays

Pierangelo Masarati wrote:

I think the problem is related to slap_mask_t being an unsigned long,
while the "mask" field in slap_verbmasks is an int; so masking with
0x80000000U may be inappropriate...  I suggest that field is made a const
slap_mask_t for consistency;

Yes, changing that to slap_mask_t seems to have fixed it without breaking anything...

note that since I'm using that code (and I
think you're using it in other parts of back-config) to implement a
verb2enum rather than a verb2masks, maybe we could add that too.

Hm, I don't see how a verb2enum function would be any different. verb_to_mask returns the index of the matching table entry, so whether it's really a mask or something else doesn't really matter, the caller can dereference the table and use the value.

masking with 0x80000000U is essentially to overcome the "if (!m) return;"
test in verb2mask...

You mean mask_to_verbs? There is no such test in verb_to_mask.

-- -- Howard Chu Chief Architect, Symas Corp. Director, Highland Sun http://www.symas.com http://highlandsun.com/hyc Symas: Premier OpenSource Development and Support