[pypy-svn] r44052 - pypy/branch/kill-ctypes/pypy/annotation

fijal at codespeak.net fijal at codespeak.net
Wed Jun 6 15:37:22 CEST 2007


Author: fijal
Date: Wed Jun  6 15:37:21 2007
New Revision: 44052

Modified:
   pypy/branch/kill-ctypes/pypy/annotation/builtin.py
   pypy/branch/kill-ctypes/pypy/annotation/classdef.py
Log:
force termios.error to be of a certain shape


Modified: pypy/branch/kill-ctypes/pypy/annotation/builtin.py
==============================================================================
--- pypy/branch/kill-ctypes/pypy/annotation/builtin.py	(original)
+++ pypy/branch/kill-ctypes/pypy/annotation/builtin.py	Wed Jun  6 15:37:21 2007
@@ -264,6 +264,9 @@
 def OSError_init(s_self, *args):
     pass
 
+def termios_error_init(s_self, *args):
+    pass
+
 def object_init(s_self, *args):
     # ignore - mostly used for abstract classes initialization
     pass

Modified: pypy/branch/kill-ctypes/pypy/annotation/classdef.py
==============================================================================
--- pypy/branch/kill-ctypes/pypy/annotation/classdef.py	(original)
+++ pypy/branch/kill-ctypes/pypy/annotation/classdef.py	Wed Jun  6 15:37:21 2007
@@ -4,7 +4,8 @@
 
 from __future__ import generators
 from pypy.annotation.model import SomePBC, s_ImpossibleValue, unionof
-from pypy.annotation.model import SomeInteger, isdegenerated
+from pypy.annotation.model import SomeInteger, isdegenerated, SomeTuple,\
+     SomeString
 from pypy.annotation import description
 
 
@@ -447,3 +448,12 @@
 FORCE_ATTRIBUTES_INTO_CLASSES = {
     OSError: {'errno': SomeInteger()},
     }
+
+try:
+    import termios
+except ImportError:
+    pass
+else:
+    FORCE_ATTRIBUTES_INTO_CLASSES[termios.error] = \
+        {'args': SomeTuple([SomeInteger(), SomeString()])}
+



More information about the Pypy-commit mailing list