[Python-checkins] CVS: python/dist/src/Modules rotormodule.c,2.25,2.26

Tim Peters python-dev@python.org
Mon, 10 Jul 2000 15:41:33 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv694/python/dist/src/modules

Modified Files:
	rotormodule.c 
Log Message:
Now that prototypes are in scope, the compiler gives legit wngs
about int size mismatches at two calls to s_rand.  Stuffed in
casts to make the code do what it did before but w/o warnings --
although unclear that's correct!


Index: rotormodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v
retrieving revision 2.25
retrieving revision 2.26
diff -C2 -r2.25 -r2.26
*** rotormodule.c	2000/07/10 13:05:29	2.25
--- rotormodule.c	2000/07/10 22:41:30	2.26
***************
*** 331,336 ****
  	RTR_d_rotors(r);
  	for (i = 0; i < r->rotors; i++) {
! 		r->positions[i] = (unsigned char) r_rand(r,r->size);
! 		r->advances[i] = (1+(2*(r_rand(r,r->size/2))));
  		RTR_permute_rotor(r,
  				  &(r->e_rotor[(i*r->size)]),
--- 331,336 ----
  	RTR_d_rotors(r);
  	for (i = 0; i < r->rotors; i++) {
! 		r->positions[i] = (unsigned char) r_rand(r, (short)r->size);
! 		r->advances[i] = (1+(2*(r_rand(r, (short)(r->size/2)))));
  		RTR_permute_rotor(r,
  				  &(r->e_rotor[(i*r->size)]),