From 489db5850996f73f85b722f742a4eb6f2db859f8 Mon Sep 17 00:00:00 2001 From: Anthony Tuininga Date: Thu, 23 Oct 2008 13:44:02 +0000 Subject: [PATCH] Make Visual Studio happy as it doesn't like variables declared after any code has been executed. --- Error.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Error.c b/Error.c index 5c8eae2..938a3c8 100644 --- a/Error.c +++ b/Error.c @@ -83,6 +83,9 @@ static udt_Error *Error_New( ub4 handleType; dvoid *handle; sword status; +#ifdef WITH_UNICODE + Py_ssize_t len; +#endif error = PyObject_NEW(udt_Error, &g_ErrorType); if (!error) @@ -104,7 +107,6 @@ static udt_Error *Error_New( return NULL; } #ifdef WITH_UNICODE - Py_ssize_t len; for (len = 0; len < sizeof(errorText); len += 2) { if (errorText[len] == 0 && errorText[len + 1] == 0) break;