summaryrefslogtreecommitdiffstats
path: root/Modules/rotormodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-11-03 15:01:26 (GMT)
committerGuido van Rossum <guido@python.org>1993-11-03 15:01:26 (GMT)
commite77a757094f68351f336044654cd91575c677896 (patch)
tree0c0f8f78c180d4a88c9c5ff8c26e2457b6722e28 /Modules/rotormodule.c
parent78ed420314876083b4cc1739d7dbf04e4f012c03 (diff)
downloadcpython-e77a757094f68351f336044654cd91575c677896.zip
cpython-e77a757094f68351f336044654cd91575c677896.tar.gz
cpython-e77a757094f68351f336044654cd91575c677896.tar.bz2
* nismodule.c: database keys and values can contain null bytes. be more
careful about these. * arraymodule.c: added 8 byte swap; added 'i' format character; added reverse() method; rename read/write to fromfile/tofile. * config.c: Set version to 0.9.9++. * rotormodule.c (r_rand): declare k1..k5 as unsigned longs so the shifts will have a well-defined effect independent of word size. * bltinmodule.c: renamed bagof() to filter().
Diffstat (limited to 'Modules/rotormodule.c')
-rw-r--r--Modules/rotormodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c
index f01c5fe..d397e2c 100644
--- a/Modules/rotormodule.c
+++ b/Modules/rotormodule.c
@@ -154,7 +154,12 @@ static void set_key(r, key)
rotorobject *r;
char *key;
{
+#ifdef BUGGY_CODE_BW_COMPAT
+ /* See comments below */
int k1=995, k2=576, k3=767, k4=671, k5=463;
+#else
+ unsigned long k1=995, k2=576, k3=767, k4=671, k5=463;
+#endif
int i;
int len=strlen(key);
for (i=0;i<len;i++) {