Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ccc51c1

Browse files
committed
fix compiler warnings
1 parent 30134f5 commit ccc51c1

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Objects/unicodeobject.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,12 @@ _PyUnicode_CheckConsistency(void *op)
369369
}
370370
return 1;
371371
}
372+
#else
373+
static int
374+
_PyUnicode_CheckConsistency(void *op)
375+
{
376+
return 1;
377+
}
372378
#endif
373379

374380
/* --- Bloom Filters ----------------------------------------------------- */
@@ -536,7 +542,7 @@ resize_inplace(PyUnicodeObject *unicode, Py_ssize_t length)
536542
_PyUnicode_LENGTH(unicode) = length;
537543
PyUnicode_WRITE(PyUnicode_KIND(unicode), data, length, 0);
538544
if (share_wstr || _PyUnicode_WSTR(unicode) == NULL) {
539-
_PyUnicode_CHECK(unicode);
545+
_PyUnicode_CheckConsistency(unicode);
540546
return 0;
541547
}
542548
}
@@ -556,7 +562,7 @@ resize_inplace(PyUnicodeObject *unicode, Py_ssize_t length)
556562
_PyUnicode_WSTR(unicode) = wstr;
557563
_PyUnicode_WSTR(unicode)[length] = 0;
558564
_PyUnicode_WSTR_LENGTH(unicode) = length;
559-
_PyUnicode_CHECK(unicode);
565+
_PyUnicode_CheckConsistency(unicode);
560566
return 0;
561567
}
562568

@@ -1354,7 +1360,7 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
13541360
*p_unicode = resize_compact(unicode, length);
13551361
if (*p_unicode == NULL)
13561362
return -1;
1357-
_PyUnicode_CHECK(*p_unicode);
1363+
_PyUnicode_CheckConsistency(*p_unicode);
13581364
return 0;
13591365
} else
13601366
return resize_inplace((PyUnicodeObject*)unicode, length);

0 commit comments

Comments
 (0)