diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-12-23 20:09:28 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-12-23 20:09:28 (GMT) |
commit | b6a53b5c5242759ef9c1411a770073c25e9cc4c4 (patch) | |
tree | 7fc7f80b130f735acbb179ebcbb8ade7d3b575d9 /Modules/_testcapimodule.c | |
parent | 1966a237fba073525d86fbfc181404c207a41333 (diff) | |
download | cpython-b6a53b5c5242759ef9c1411a770073c25e9cc4c4.zip cpython-b6a53b5c5242759ef9c1411a770073c25e9cc4c4.tar.gz cpython-b6a53b5c5242759ef9c1411a770073c25e9cc4c4.tar.bz2 |
use a global variable, so the compiler doesn't optimize the assignment out
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r-- | Modules/_testcapimodule.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 145d5b6..4e81d63 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -474,6 +474,8 @@ test_k_code(PyObject *self) #ifdef Py_USING_UNICODE +volatile int x; + /* Test the u and u# codes for PyArg_ParseTuple. May leak memory in case of an error. */ @@ -486,8 +488,7 @@ test_u_code(PyObject *self) /* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */ /* Just use the macro and check that it compiles */ - int x = Py_UNICODE_ISSPACE(25); - x = x; + x = Py_UNICODE_ISSPACE(25); tuple = PyTuple_New(1); if (tuple == NULL) |