[pypy-dev] compilemodule.py not working

Haggai Eran haggai.eran at gmail.com
Wed Aug 30 10:53:56 CEST 2006


Hi
I cannot get the compilemodule to work. It seems that strings returned
from PyString_FromStringAndSize are unwrapped automatically, causing
ctypes.byref to fail.

Traceback (most recent call last):
  File "../bin/compilemodule.py", line 12, in ?
    main(sys.argv)
  File "/usr/src/pypy-dist/pypy/rpython/rctypes/tool/compilemodule.py",
line 78, in main
    c_ext_module = compilemodule(argv[1], interactive=True)
  File "/usr/src/pypy-dist/pypy/rpython/rctypes/tool/compilemodule.py",
line 26, in compilemodule
    module = ModuleClass(space, space.wrap(modname))
  File "/usr/src/pypy-dist/pypy/module/thread/__init__.py", line 25, in __init__
    MixedModule.__init__(self, space, *args)
  File "/usr/src/pypy-dist/pypy/interpreter/mixedmodule.py", line 18,
in __init__
    Module.__init__(self, space, w_name)
  File "/usr/src/pypy-dist/pypy/interpreter/module.py", line 17, in __init__
    space.setitem(w_dict, space.new_interned_str('__name__'), w_name)
  File "/usr/src/pypy-dist/pypy/objspace/cpy/objspace.py", line 171,
in new_interned_str
    PyString_InternInPlace(byref(w_s))
TypeError: byref() argument must be a ctypes instance, not 'str'


-- 
Haggai Eran



More information about the Pypy-dev mailing list