[Mono-list] [PATCH] bitset doc

Paolo Molaro lupus@ximian.com
Mon, 3 Jun 2002 15:43:48 +0200


On 06/02/02 Dennis Haney wrote:
> I found two new errors. In clone the new_size was used as arg in
> memcpy, VERY WRONG! my_g_bit_nth_lsf was hardcoded to 32 bit machines
> :( Both have been corrected!

I just changed my_g_bit_nth_lsf() to explicitly take a guint32.

> And I added at equal_smallest that only checks the first bits upto the
> smallest bitset's size. And added test and doc for it.

Well, if we are going to add a more generic equals method, it's should
be really generic, like:

	mono_bitset_equals (MonoBitSet *set1, MonoBitSet *set2, int start, int count);

Or something like that. However, I'd like to wait until such method is
actually needed in real code.

> And I changed all the params that were actually used const to reflect
> that fact, that should give the compiler a little bone in optimization
> ;) Plus it also makes it easiere to see which param is altered in
> copy/intersect/union etc.

I kept the const on the MonoBitSet arguments, but I dropped them on the
integer params, since:
1) a compiler can check anyway if the variable is changed
2) it introduces code to workaround the constness.

> > Mailman is stupid and it uses the Sender: header instead of the From:
> > one so I need to approve your posts (and your sender address bounces
> > so you don't get the message back).
> 
> Upgrade to 2.0?

Well, I don't know if the admins have a reason for not upgrading nor if
2.0 solves the problem. Fixing your MTA to use the correct Sender
is a good idea anyway:-)

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better