Commits

timfel  committed 5c7bcc8

Update rsdl to work with after rpython split

  • Participants
  • Parent commits d08013e

Comments (0)

Files changed (11)

File rsdl/RIMG.py

 import sys
-from pypy.rpython.lltypesystem import lltype, rffi
-from pypy.rpython.tool import rffi_platform as platform
-from pypy.translator.tool.cbuild import ExternalCompilationInfo
+from rpython.rtyper.lltypesystem import lltype, rffi
+from rpython.rtyper.tool import rffi_platform as platform
+from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rsdl import RSDL
 
 

File rsdl/RMix.py

 import sys
-from pypy.rpython.lltypesystem import lltype, rffi
-from pypy.rpython.tool import rffi_platform as platform
-from pypy.translator.tool.cbuild import ExternalCompilationInfo
+from rpython.rtyper.lltypesystem import lltype, rffi
+from rpython.rtyper.tool import rffi_platform as platform
+from rpython.translator.tool.cbuild import ExternalCompilationInfo
 from rsdl import RSDL
 
 

File rsdl/RSDL.py

-from pypy.rpython.lltypesystem import lltype, rffi
-from pypy.rpython.tool import rffi_platform as platform
+from rpython.rtyper.lltypesystem import lltype, rffi
+from rpython.rtyper.tool import rffi_platform as platform
 from rsdl.constants import _constants
 from rsdl.eci import get_rsdl_compilation_info
-from pypy.rlib.objectmodel import we_are_translated
+from rpython.rlib.objectmodel import we_are_translated
 import py
 import sys
 
                               Uint32, Uint32, Uint32, Uint32],
                              SurfacePtr)
 
+CreateRGBSurfaceFrom = external('SDL_CreateRGBSurfaceFrom', 
+                                [rffi.VOIDP, rffi.INT, rffi.INT, rffi.INT, rffi.INT,
+                                 Uint32, Uint32, Uint32, Uint32],
+                                SurfacePtr)
+
 LockSurface      = external('SDL_LockSurface', 
                              [SurfacePtr], 
                              rffi.INT)

File rsdl/RSDL_helper.py

-from pypy.rpython.lltypesystem import lltype, rffi
+from rpython.rtyper.lltypesystem import lltype, rffi
 from rsdl import RSDL
 
 def get_rgb(color, format):
     dstrect = mallocrect(x, y, rffi.getintfield(src, 'c_w'), rffi.getintfield(src, 'c_w'))
     RSDL.BlitSurface(src, lltype.nullptr(RSDL.Rect), dst, dstrect)
     lltype.free(dstrect, flavor='raw')
-
-from pypy.translator.tool.cbuild import ExternalCompilationInfo
-from pypy.translator.platform import CompilationError
+from rpython.translator.tool.cbuild import ExternalCompilationInfo
+from rpython.translator.platform import CompilationError
 import py
 import sys
 

File rsdl/test/conftest.py

-from pypy.rlib.rsdl.eci import check_sdl_installation, SDLNotInstalled
+from rsdl.eci import check_sdl_installation, SDLNotInstalled
 import py
 
 def pytest_ignore_collect(path):

File rsdl/test/test_basic.py

 import py
-from pypy.rlib.rsdl import RSDL
-from pypy.rlib.rarithmetic import r_uint
-from pypy.rpython.lltypesystem import rffi
+from rsdl import RSDL
+from rpython.rlib.rarithmetic import r_uint
+from rpython.rtyper.lltypesystem import rffi
 
 
 def test_sdl_init():
     i = RSDL.GetTicks()
     assert i >= 10
     RSDL.Quit()
-    
+    

File rsdl/test/test_sdl_image.py

 import py, os
 from rsdl import RSDL, RIMG, RSDL_helper, test
-from pypy.rpython.lltypesystem import lltype, rffi
+from rpython.rtyper.lltypesystem import lltype, rffi
 this_dir = test.__path__[0]
 
 

File rsdl/test/test_sdl_mixer.py

 import py
 import os
 import time
-from pypy.rlib.rsdl import RSDL, RMix, RSDL_helper
-from pypy.rpython.lltypesystem import lltype, rffi
+from rsdl import RSDL, RMix, RSDL_helper
+from rpython.rtyper.lltypesystem import lltype, rffi
 
 def test_open_mixer():
     if RMix.OpenAudio(22050, RSDL.AUDIO_S16LSB, 2, 1024) != 0:

File rsdl/test/test_surface.py

 import py, sys
-from pypy.rlib.rsdl import RSDL, RSDL_helper
-from pypy.rlib.rarithmetic import r_uint
-from pypy.rpython.lltypesystem import lltype, rffi
+from rsdl import RSDL, RSDL_helper
+from rpython.rlib.rarithmetic import r_uint
+from rpython.rtyper.lltypesystem import lltype, rffi
 
 class TestSurface:
 

File rsdl/test/test_video.py

 
 import py, sys
-from pypy.rlib.rsdl import RSDL, RSDL_helper
-from pypy.rlib.rarithmetic import r_uint
-from pypy.rpython.lltypesystem import lltype, rffi
+from rsdl import RSDL, RSDL_helper
+from rpython.rlib.rarithmetic import r_uint
+from rpython.rtyper.lltypesystem import lltype, rffi
 
 #
 #  This test file is skipped unless run with "py.test --view".