Move a variable declration outside of a loop to match what was

done in r81843 for py3k.
This commit is contained in:
Brian Curtin 2010-06-08 21:15:06 +00:00
parent fa4c59fa0c
commit d7afd31a9b
1 changed files with 4 additions and 4 deletions

View File

@ -1187,6 +1187,7 @@ PyEnumValue(PyObject *self, PyObject *args)
long rc; long rc;
char *retValueBuf; char *retValueBuf;
char *retDataBuf; char *retDataBuf;
char *tmpBuf;
DWORD retValueSize, bufValueSize; DWORD retValueSize, bufValueSize;
DWORD retDataSize, bufDataSize; DWORD retDataSize, bufDataSize;
DWORD typ; DWORD typ;
@ -1218,7 +1219,6 @@ PyEnumValue(PyObject *self, PyObject *args)
} }
while (1) { while (1) {
char *tmp;
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
rc = RegEnumValue(hKey, rc = RegEnumValue(hKey,
index, index,
@ -1234,13 +1234,13 @@ PyEnumValue(PyObject *self, PyObject *args)
break; break;
bufDataSize *= 2; bufDataSize *= 2;
tmp = (char *)PyMem_Realloc(retDataBuf, bufDataSize); tmpBuf = (char *)PyMem_Realloc(retDataBuf, bufDataSize);
if (tmp == NULL) { if (tmpBuf == NULL) {
PyErr_NoMemory(); PyErr_NoMemory();
retVal = NULL; retVal = NULL;
goto fail; goto fail;
} }
retDataBuf = tmp; retDataBuf = tmpBuf;
retDataSize = bufDataSize; retDataSize = bufDataSize;
retValueSize = bufValueSize; retValueSize = bufValueSize;
} }