[Mono-list] [PATCH] bitset doc

Dennis Haney davh@davh.dk
03 Jun 2002 20:51:17 +0200


Paolo Molaro <lupus@ximian.com> writes:

> 	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.

Ok, but you forgot to remove some of my testlines for it...
c
*** monobitset.c.~1.6.~	Mon Jun  3 20:43:06 2002
--- monobitset.c	Mon Jun  3 20:43:28 2002
***************
*** 621,635 ****
  	error++;
  
  	mono_bitset_free (set1);
- 
- 	set1 = mono_bitset_new (200, 0);
- 	mono_bitset_set (set1, 0);
- 	mono_bitset_set (set1, 1);
- 	mono_bitset_set (set1, 10);
- 	mono_bitset_set (set1, 31);
- 	mono_bitset_set (set1, 150);
- 
- 	mono_bitset_free (set1);
  	mono_bitset_free (set2);
  	mono_bitset_free (set3);
  	mono_bitset_free (set4);
--- 621,626 ----



> > 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.

Great. (actually ints are call-by-value and thus the code is the same)

> > > 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:-)

Not my MTA, my mail server ;)



-- 
Dennis
use Inline C => qq{void p(char*g){
printf("Just Another %s Hacker\n",g);}};p("Perl");