Add test for memoryview of extension type
authorMatěj Laitl <matej@laitl.cz>
Thu, 29 Nov 2012 21:50:08 +0000 (22:50 +0100)
committerMatěj Laitl <matej@laitl.cz>
Tue, 22 Jan 2013 14:54:23 +0000 (15:54 +0100)
commitde9050401929751af0af2d792ecf5390f4381fc1
treeb0ff9c93cbcba1cb39af20eabde926571748e658
parentd06c895836a5512d25eceeab1f5077aa6b8c0cb5
Add test for memoryview of extension type

A test for a bug fixed in commit 478b939a4c99a77c0863cfd.

v2: add commit link above
v3: # tag: instead of # tags:, drop cpp tag as it means something different
    that I originally thought

There was a bug that produced C code where gcc emitted warnings:
extension_type_memoryview.c: In function ‘__pyx_pf_25extension_type_memoryview_test_getitem’:
extension_type_memoryview.c:1468:15: warning: assignment from incompatible pointer type
extension_type_memoryview.c: In function ‘__pyx_pf_25extension_type_memoryview_2test_getitem_typed’:
extension_type_memoryview.c:1565:15: warning: assignment from incompatible pointer type
extension_type_memoryview.c:1568:18: warning: assignment from incompatible pointer type

And g++ failed with errors:
extension_type_memoryview.c: In function ‘PyObject* __pyx_pf_25extension_type_memoryview_test_getitem(PyObject*)’:
extension_type_memoryview.c:1468:213: error: cannot convert ‘__pyx_obj_25extension_type_memoryview_ExtensionType*’ to ‘PyObject*’ in assignment
extension_type_memoryview.c: In function ‘PyObject* __pyx_pf_25extension_type_memoryview_2test_getitem_typed(PyObject*)’:
extension_type_memoryview.c:1565:213: error: cannot convert ‘__pyx_obj_25extension_type_memoryview_ExtensionType*’ to ‘PyObject*’ in assignment
extension_type_memoryview.c:1568:20: error: cannot convert ‘PyObject*’ to ‘__pyx_obj_25extension_type_memoryview_ExtensionType*’ in assignment
tests/memoryview/extension_type_memoryview.pyx [new file with mode: 0644]