[pypy-svn] r71974 - in pypy/trunk/pypy/lib/ctypes_config_cache: . test

arigo at codespeak.net arigo at codespeak.net
Tue Mar 9 17:58:45 CET 2010


Author: arigo
Date: Tue Mar  9 17:58:44 2010
New Revision: 71974

Modified:
   pypy/trunk/pypy/lib/ctypes_config_cache/locale.ctc.py
   pypy/trunk/pypy/lib/ctypes_config_cache/test/test_cache.py
Log:
Test and fix: CHAR_MAX is actually coming from limits.h.


Modified: pypy/trunk/pypy/lib/ctypes_config_cache/locale.ctc.py
==============================================================================
--- pypy/trunk/pypy/lib/ctypes_config_cache/locale.ctc.py	(original)
+++ pypy/trunk/pypy/lib/ctypes_config_cache/locale.ctc.py	Tue Mar  9 17:58:44 2010
@@ -22,7 +22,8 @@
 ]
 
 class LocaleConfigure:
-    _compilation_info_ = ExternalCompilationInfo(includes=['locale.h'])
+    _compilation_info_ = ExternalCompilationInfo(includes=['limits.h',
+                                                           'locale.h'])
 for key in _CONSTANTS:
     setattr(LocaleConfigure, key, DefinedConstantInteger(key))
 
@@ -34,7 +35,7 @@
 
 # ____________________________________________________________
 
-eci = ExternalCompilationInfo(includes=['langinfo.h'])
+eci = ExternalCompilationInfo(includes=['locale.h', 'langinfo.h'])
 HAS_LANGINFO = check_eci(eci)
 
 if HAS_LANGINFO:

Modified: pypy/trunk/pypy/lib/ctypes_config_cache/test/test_cache.py
==============================================================================
--- pypy/trunk/pypy/lib/ctypes_config_cache/test/test_cache.py	(original)
+++ pypy/trunk/pypy/lib/ctypes_config_cache/test/test_cache.py	Tue Mar  9 17:58:44 2010
@@ -38,3 +38,8 @@
 def test_pyexpat():
     d = run('pyexpat.ctc.py', '_pyexpat_cache.py')
     assert 'XML_COMBINED_VERSION' in d
+
+def test_locale():
+    d = run('locale.ctc.py', '_locale_cache.py')
+    assert 'LC_ALL' in d
+    assert 'CHAR_MAX' in d



More information about the Pypy-commit mailing list