[pypy-svn] r31382 - pypy/dist/pypy/module/bz2

rhymes at codespeak.net rhymes at codespeak.net
Thu Aug 17 21:03:05 CEST 2006


Author: rhymes
Date: Thu Aug 17 21:03:01 2006
New Revision: 31382

Modified:
   pypy/dist/pypy/module/bz2/bzlib.py
   pypy/dist/pypy/module/bz2/fileobject.py
   pypy/dist/pypy/module/bz2/interp_bz2.py
Log:
more fixes to make it compile. Almost there

Modified: pypy/dist/pypy/module/bz2/bzlib.py
==============================================================================
--- pypy/dist/pypy/module/bz2/bzlib.py	(original)
+++ pypy/dist/pypy/module/bz2/bzlib.py	Thu Aug 17 21:03:01 2006
@@ -65,6 +65,7 @@
     ('_base', POINTER(c_ubyte)),
     ('_size', c_int),
 ]
+__sbuf.__name__ = "__sbuf__"
 assert sizeof(__sbuf) == 8, sizeof(__sbuf)
 assert alignment(__sbuf) == 4, alignment(__sbuf)
 class __sFILEX(Structure):
@@ -95,6 +96,7 @@
     ('_blksize', c_int),
     ('_offset', fpos_t),
 ]
+__sFILE.__name__ = "__sFILE__"
 assert sizeof(__sFILE) == 88, sizeof(__sFILE)
 assert alignment(__sFILE) == 4, alignment(__sFILE)
 FILE = __sFILE

Modified: pypy/dist/pypy/module/bz2/fileobject.py
==============================================================================
--- pypy/dist/pypy/module/bz2/fileobject.py	(original)
+++ pypy/dist/pypy/module/bz2/fileobject.py	Thu Aug 17 21:03:01 2006
@@ -107,6 +107,7 @@
     ('_base', POINTER(c_ubyte)),
     ('_size', c_int),
 ]
+__sbuf.__name__ = "__sbuf_"
 assert sizeof(__sbuf) == 8, sizeof(__sbuf)
 assert alignment(__sbuf) == 4, alignment(__sbuf)
 class __sFILEX(Structure):
@@ -137,6 +138,7 @@
     ('_blksize', c_int),
     ('_offset', fpos_t),
 ]
+__sFILE.__name__ = "__sFILE_"
 assert sizeof(__sFILE) == 88, sizeof(__sFILE)
 assert alignment(__sFILE) == 4, alignment(__sFILE)
 FILE = __sFILE
@@ -684,6 +686,7 @@
     pass
 class _object(Structure):
     pass
+_object.__name__ = "_object_"
 PyObject = _object
 PyFileObject._fields_ = [
     ('ob_refcnt', Py_ssize_t),
@@ -848,12 +851,15 @@
 class PyMethodDef(Structure):
     pass
 PyMethodDef._fields_ = []
+PyMethodDef.__name__ = "PyMethodDef_"
 class PyMemberDef(Structure):
     pass
 PyMemberDef._fields_ = []
+PyMemberDef.__name__ = "PyMemberDef_"
 class PyGetSetDef(Structure):
     pass
 PyGetSetDef._fields_ = []
+PyGetSetDef.__name__ = "PyGetSetDef_"
 _typeobject._fields_ = [
     ('ob_refcnt', Py_ssize_t),
     ('ob_type', POINTER(_typeobject)),
@@ -904,6 +910,7 @@
     ('tp_weaklist', POINTER(PyObject)),
     ('tp_del', destructor),
 ]
+_typeobject.__name__ = "_typeobject_"
 assert sizeof(_typeobject) == 192, sizeof(_typeobject)
 assert alignment(_typeobject) == 4, alignment(_typeobject)
 PyTypeObject = _typeobject

Modified: pypy/dist/pypy/module/bz2/interp_bz2.py
==============================================================================
--- pypy/dist/pypy/module/bz2/interp_bz2.py	(original)
+++ pypy/dist/pypy/module/bz2/interp_bz2.py	Thu Aug 17 21:03:01 2006
@@ -24,6 +24,9 @@
     #include <sys/types.h>
     #include <bzlib.h>
     """
+    # XXX: with this it should compile fine but on my machine pypy doesn't
+    # inject this header so it's pretty useless. Kept as a remind.
+    # _includes_ = ["bzlib.h"]
     off_t = ctypes_platform.SimpleType("off_t", c_longlong)
     size_t = ctypes_platform.SimpleType("size_t", c_ulong)
     BUFSIZ = ctypes_platform.ConstantInteger("BUFSIZ")



More information about the Pypy-commit mailing list