[pypy-svn] r26841 - pypy/dist/pypy/rpython/module
arigo at codespeak.net
arigo at codespeak.net
Sat May 6 00:07:20 CEST 2006
Author: arigo
Date: Sat May 6 00:07:19 2006
New Revision: 26841
Modified:
pypy/dist/pypy/rpython/module/ll_os.py
pypy/dist/pypy/rpython/module/ll_os_path.py
pypy/dist/pypy/rpython/module/support.py
Log:
Move some imports away to avoid importing the rtyper early during annotation.
Modified: pypy/dist/pypy/rpython/module/ll_os.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os.py Sat May 6 00:07:19 2006
@@ -14,7 +14,6 @@
# and buffer preparation stuff is not useful.
import os, errno
-from pypy.rpython.lltypesystem.rstr import STR
from pypy.rpython.lltypesystem.lltype import \
GcStruct, Signed, Array, Char, Ptr, malloc
from pypy.rpython.module.support import to_rstr, from_rstr, ll_strcpy, _ll_strfill
@@ -34,6 +33,7 @@
ll_read_into.suggested_primitive = True
def ll_os_read(fd, count):
+ from pypy.rpython.lltypesystem.rstr import STR
if count < 0:
raise OSError(errno.EINVAL, None)
buffer = malloc(STR, count)
Modified: pypy/dist/pypy/rpython/module/ll_os_path.py
==============================================================================
--- pypy/dist/pypy/rpython/module/ll_os_path.py (original)
+++ pypy/dist/pypy/rpython/module/ll_os_path.py Sat May 6 00:07:19 2006
@@ -6,7 +6,6 @@
import os
import stat
-from pypy.rpython.lltypesystem.rstr import STR
from pypy.rpython.module.support import to_rstr, from_rstr, ll_strcpy
from pypy.rpython.module.ll_os import ll_os_stat
Modified: pypy/dist/pypy/rpython/module/support.py
==============================================================================
--- pypy/dist/pypy/rpython/module/support.py (original)
+++ pypy/dist/pypy/rpython/module/support.py Sat May 6 00:07:19 2006
@@ -1,12 +1,12 @@
from pypy.rpython.lltypesystem import lltype
from pypy.rpython import extfunctable
-from pypy.rpython.lltypesystem.rstr import STR
from pypy.rpython.lltypesystem.lltype import \
GcStruct, Signed, Array, Char, Ptr, malloc
# utility conversion functions
def to_rstr(s):
+ from pypy.rpython.lltypesystem.rstr import STR
if s is None:
return lltype.nullptr(STR)
p = malloc(STR, len(s))
More information about the Pypy-commit
mailing list