cext: move variable declaration to the top of the block for C89 support
Not sure if we still care about C89 in general, but MSVC requires this style
too.
Differential Revision: https://phab.mercurial-scm.org/D8304
--- a/mercurial/cext/revlog.c Wed Mar 18 21:27:45 2020 +0100
+++ b/mercurial/cext/revlog.c Fri Mar 20 10:04:13 2020 -0400
@@ -153,11 +153,12 @@
{
if (self->inlined && pos > 0) {
if (self->offsets == NULL) {
+ Py_ssize_t ret;
self->offsets = PyMem_Malloc(self->raw_length *
sizeof(*self->offsets));
if (self->offsets == NULL)
return (const char *)PyErr_NoMemory();
- Py_ssize_t ret = inline_scan(self, self->offsets);
+ ret = inline_scan(self, self->offsets);
if (ret == -1) {
return NULL;
};