Issue #25558: Use compile-time asserts.

This commit is contained in:
Serhiy Storchaka 2015-11-07 15:42:38 +02:00
parent 41a87637c0
commit fad85aadb0
7 changed files with 24 additions and 20 deletions

View file

@ -379,7 +379,7 @@ _PyRandom_Init(void)
char *env;
unsigned char *secret = (unsigned char *)&_Py_HashSecret.uc;
Py_ssize_t secret_size = sizeof(_Py_HashSecret_t);
assert(secret_size == sizeof(_Py_HashSecret.uc));
Py_BUILD_ASSERT(sizeof(_Py_HashSecret_t) == sizeof(_Py_HashSecret.uc));
if (_Py_HashSecret_Initialized)
return;