Author: Armin Rigo <[email protected]>
Branch: cffi-1.0
Changeset: r1935:13678138d79e
Date: 2015-05-08 20:35 +0200
http://bitbucket.org/cffi/cffi/changeset/13678138d79e/
Log: unicode_literals detection
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -479,7 +479,9 @@
if hasattr(self, '_assigned_source'):
raise ValueError("set_source() cannot be called several times "
"per ffi object")
- self._recompiler_module_name = module_name
+ if not isinstance(module_name, basestring):
+ raise TypeError("'module_name' must be a string")
+ self._recompiler_module_name = str(module_name)
self._assigned_source = (source, kwds)
def distutils_extension(self, tmpdir='build'):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit