[pypy-commit] cffi default: Tweak the warning message
arigo
pypy.commits at gmail.com
Sun Nov 3 01:37:23 EST 2019
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r3308:0d43d8bf557f
Date: 2019-11-03 07:30 +0100
http://bitbucket.org/cffi/cffi/changeset/0d43d8bf557f/
Log: Tweak the warning message
diff --git a/cffi/cparser.py b/cffi/cparser.py
--- a/cffi/cparser.py
+++ b/cffi/cparser.py
@@ -159,9 +159,9 @@
def _warn_for_non_extern_non_static_global_variable(decl):
if not decl.storage:
import warnings
- warnings.warn("Declaration of global variable '%s' in cdef() should "
- "be marked 'extern' for consistency (or possibly "
- "'static' in API mode)" % (decl.name,))
+ warnings.warn("Global variable '%s' in cdef(): for consistency "
+ "with C it should have a storage class specifier "
+ "(usually 'extern')" % (decl.name,))
def _preprocess(csource):
# Remove comments. NOTE: this only work because the cdef() section
More information about the pypy-commit
mailing list