Author: fijal Date: Sun Oct 7 23:37:08 2007 New Revision: 47272 Modified: pypy/dist/pypy/module/_demo/demo.py Log: Move _demo from rctypes to rffi
Modified: pypy/dist/pypy/module/_demo/demo.py ============================================================================== --- pypy/dist/pypy/module/_demo/demo.py (original) +++ pypy/dist/pypy/module/_demo/demo.py Sun Oct 7 23:37:08 2007 @@ -2,16 +2,13 @@ from pypy.interpreter.baseobjspace import ObjSpace, W_Root, Wrappable from pypy.interpreter.gateway import interp2app from pypy.interpreter.typedef import TypeDef, GetSetProperty -from pypy.rpython.rctypes.tool import ctypes_platform -from pypy.rpython.rctypes.tool.libc import libc +from pypy.rpython.lltypesystem import rffi, lltype +from pypy.rpython.tool import rffi_platform import sys, math -from ctypes import * -time_t = ctypes_platform.getsimpletype('time_t', '#include <time.h>', c_long) +time_t = rffi_platform.getsimpletype('time_t', '#include <time.h>', rffi.LONG) -time = libc.time -time.argtypes = [POINTER(time_t)] -time.restype = time_t +time = rffi.llexternal('time', [rffi.VOIDP], time_t, includes=['time.h']) def get(space, name): w_module = space.getbuiltinmodule('_demo') _______________________________________________ pypy-svn mailing list pypy-svn@codespeak.net http://codespeak.net/mailman/listinfo/pypy-svn