projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02cbdd3
)
struct_pack(): Repair new assert-fail crash in
author
Tim Peters
<tim.peters@gmail.com>
Thu, 16 Feb 2006 20:19:46 +0000
(20:19 +0000)
committer
Tim Peters
<tim.peters@gmail.com>
Thu, 16 Feb 2006 20:19:46 +0000
(20:19 +0000)
debug-build test_struct on a box where plain "char"
is signed.
Modules/structmodule.c
patch
|
blob
|
history
diff --git
a/Modules/structmodule.c
b/Modules/structmodule.c
index 2fa6e909c5597f28f8ee1047ddf984e2e14edb6e..4713c0cf76bc94dc40ddcd905ec0f9f32ab5a3b4 100644
(file)
--- a/
Modules/structmodule.c
+++ b/
Modules/structmodule.c
@@
-1134,7
+1134,7
@@
struct_pack(PyObject *self, PyObject *args)
if (n > 255)
n = 255;
/* store the length byte */
- *res++ = Py_SAFE_DOWNCAST(n, Py_ssize_t, char);
+ *res++ = Py_SAFE_DOWNCAST(n, Py_ssize_t,
unsigned
char);
res += num;
break;
}