Mercurial > cpython-lru_cache-weakref
diff Modules/_struct.c @ 63070:c16b3f6ac511 2.6
Merged revisions 82945 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
................
r82945 | mark.dickinson | 2010-07-18 08:55:55 +0100 (Sun, 18 Jul 2010) | 14 lines
Merged revisions 82941,82943 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82941 | mark.dickinson | 2010-07-18 08:29:02 +0100 (Sun, 18 Jul 2010) | 3 lines
Issue #9277: Struct module: standard bool packing was incorrect if
char is unsigned. Thanks Stefan Krah for the patch.
........
r82943 | mark.dickinson | 2010-07-18 08:48:20 +0100 (Sun, 18 Jul 2010) | 1 line
Misc/NEWS entry for r82941.
........
................
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Sun, 18 Jul 2010 08:01:37 +0000 |
| parents | 80110fd43191 |
| children | 89d78b667d07 |
line wrap: on
line diff
--- a/Modules/_struct.c Sat Jul 17 12:31:09 2010 +0000 +++ b/Modules/_struct.c Sun Jul 18 08:01:37 2010 +0000 @@ -1013,9 +1013,9 @@ static int bp_bool(char *p, PyObject *v, const formatdef *f) { - char y; + int y; y = PyObject_IsTrue(v); - memcpy(p, (char *)&y, sizeof y); + *p = (char)y; return 0; }
