summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/test_c.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/c/test_c.py b/c/test_c.py
index d039edf..7880703 100644
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -3974,6 +3974,15 @@ def test_from_buffer_types():
with pytest.raises(ValueError):
release(pv[0])
+def test_issue483():
+ BInt = new_primitive_type("int")
+ BIntP = new_pointer_type(BInt)
+ BIntA = new_array_type(BIntP, None)
+ lst = list(range(25))
+ bytestring = bytearray(buffer(newp(BIntA, lst))[:] + b'XYZ')
+ p1 = from_buffer(BIntA, bytestring) # int[]
+ assert sizeof(p1) == 25 * size_of_int()
+
def test_memmove():
Short = new_primitive_type("short")
ShortA = new_array_type(new_pointer_type(Short), None)