Skip to content

Commit f37e0c0

Browse files
committed
pypy fixes
1 parent 75fdf93 commit f37e0c0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

example_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def bytes(self):
6767

6868
@bytes.setter
6969
def bytes(self, bytes):
70-
self._saved_ref = (c_char * len(bytes)).from_buffer(bytes)
70+
self._saved_ref = (c_ubyte * len(bytes))()
71+
self._saved_ref[:] = bytes
7172
self._bytes = cast(self._saved_ref, c_void_p)
7273
self.length = len(bytes)
7374

tinycc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
ctypes.c_ushort: 'unsigned short',
5757
ctypes.c_double: 'double',
5858
ctypes.c_float: 'float',
59-
ctypes.c_longdouble: 'long double',
59+
#ctypes.c_longdouble: 'long double', # long double not working in PyPy
6060
ctypes.c_bool: '_Bool',
6161
ctypes.c_byte: 'char',
6262
ctypes.c_ubyte: 'unsigned char',

0 commit comments

Comments
 (0)