Commits

Ronan Lamy committed 8d27883

kill rpython.rtyper.module.support.OOSupport

  • Participants
  • Parent commits 5aafdaf
  • Branches kill-ootype

Comments (0)

Files changed (2)

File rpython/rtyper/module/ll_strtod.py

 from rpython.rtyper.extfunc import BaseLazyRegistering, extdef, registering
 from rpython.rlib import rfloat
 from rpython.rtyper.lltypesystem import lltype, rffi
-from rpython.rtyper.ootypesystem import ootype
 from rpython.rlib import rposix
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rpython.conftest import cdir

File rpython/rtyper/module/support.py

-import os
 import sys
 
 from rpython.annotator import model as annmodel
 from rpython.rtyper.lltypesystem import lltype, rffi
-from rpython.rtyper.ootypesystem import ootype
 
 _WIN32 = sys.platform.startswith('win')
 underscore_on_windows = '_' if _WIN32 else ''
 # utility conversion functions
 class LLSupport:
     _mixin_ = True
-    
+
     def to_rstr(s):
         from rpython.rtyper.lltypesystem.rstr import STR, mallocstr
         if s is None:
         for i in range(len(s)):
             p.chars[i] = s[i]
         return p
-    to_runicode = staticmethod(to_runicode)    
+    to_runicode = staticmethod(to_runicode)
 
     def from_rstr(rs):
         if not rs:   # null pointer
         return ''.join([rs.chars[i] for i in range(len(rs.chars))])
     from_rstr_nonnull = staticmethod(from_rstr_nonnull)
 
-class OOSupport:
-    _mixin_ = True
-
-    def to_rstr(s):
-        if s is None:
-            return ootype.null(ootype.String)
-        return ootype.oostring(s, -1)
-    to_rstr = staticmethod(to_rstr)
-
-    def to_runicode(u):
-        return ootype.oounicode(u, -1)
-    to_runicode = staticmethod(to_runicode)
-    
-    def from_rstr(rs):
-        if not rs:   # null pointer
-            return None
-        else:
-            return "".join([rs.ll_stritem_nonneg(i) for i in range(rs.ll_strlen())])
-    from_rstr = staticmethod(from_rstr)        
-
-    def from_rstr_nonnull(rs):
-        assert rs
-        return "".join([rs.ll_stritem_nonneg(i) for i in range(rs.ll_strlen())])
-    from_rstr_nonnull = staticmethod(from_rstr_nonnull)
-
 
 class StringTraits:
     str = str