Kaydet (Commit) b6a53b5c authored tarafından Benjamin Peterson's avatar Benjamin Peterson

use a global variable, so the compiler doesn't optimize the assignment out

üst 1966a237
...@@ -474,6 +474,8 @@ test_k_code(PyObject *self) ...@@ -474,6 +474,8 @@ test_k_code(PyObject *self)
#ifdef Py_USING_UNICODE #ifdef Py_USING_UNICODE
volatile int x;
/* Test the u and u# codes for PyArg_ParseTuple. May leak memory in case /* Test the u and u# codes for PyArg_ParseTuple. May leak memory in case
of an error. of an error.
*/ */
...@@ -486,8 +488,7 @@ test_u_code(PyObject *self) ...@@ -486,8 +488,7 @@ test_u_code(PyObject *self)
/* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */ /* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */
/* Just use the macro and check that it compiles */ /* Just use the macro and check that it compiles */
int x = Py_UNICODE_ISSPACE(25); x = Py_UNICODE_ISSPACE(25);
x = x;
tuple = PyTuple_New(1); tuple = PyTuple_New(1);
if (tuple == NULL) if (tuple == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment