diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-07 15:42:38 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-07 15:42:38 +0200 |
commit | fad85aadb0e168b7bde414694e448f34bb38c8ef (patch) | |
tree | f8fd61aa10789d9bda57c33d66ff4e60bd4d2794 /Include/pymacro.h | |
parent | 41a87637c0406d73425f79ba11aa43dbae9cfe0f (diff) | |
download | cpython-git-fad85aadb0e168b7bde414694e448f34bb38c8ef.tar.gz |
Issue #25558: Use compile-time asserts.
Diffstat (limited to 'Include/pymacro.h')
-rw-r--r-- | Include/pymacro.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/pymacro.h b/Include/pymacro.h index 3f6f5dce61..49929e5083 100644 --- a/Include/pymacro.h +++ b/Include/pymacro.h @@ -36,6 +36,10 @@ #define Py_BUILD_ASSERT_EXPR(cond) \ (sizeof(char [1 - 2*!(cond)]) - 1) +#define Py_BUILD_ASSERT(cond) do { \ + (void)Py_BUILD_ASSERT_EXPR(cond); \ + } while(0) + /* Get the number of elements in a visible array This does not work on pointers, or arrays declared as [], or function |