chiark
/
gitweb
/
~mdw
/
pyke
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e082a8
)
getulong: Compare with LONG_MAX to decide what Python type to use.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 22 Mar 2006 12:58:45 +0000
(12:58 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 22 Mar 2006 12:58:45 +0000
(12:58 +0000)
This may reduce the number of bignums created on 64-bit machines.
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index 166cdbbb1da1d8caf10299d2ce11c3af40139457..1739ebe9b4a2d4a78685b25b9d563a3227cfa0e5 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-34,7
+34,7
@@
PyObject *getulong(unsigned long w)
{
- if (w <=
MASK32
)
+ if (w <=
LONG_MAX
)
return (PyInt_FromLong(w));
else
return (PyLong_FromUnsignedLong(w));