Skip to content

Commit

Permalink
Test for fixing of offset calculation of std::vector<unsigned> da…
Browse files Browse the repository at this point in the history
…tamember on Mac arm
  • Loading branch information
wlav committed May 31, 2024
1 parent b382a03 commit adc7869
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ master
* Fixed regression for pickling enums (in global scope only)
* Auto-cast elements of std::vector<T*>, with T a class type
* Add a ``Sequence_Check()`` method to the public API
* Fix offset calculation of ``std::vector<unsigned>`` datamember on Mac arm


2023-11-15: 3.1.2
Expand Down
8 changes: 8 additions & 0 deletions test/test_fragile.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,14 @@ def test28_memoryview_of_empty(self):
except TypeError:
pass # used to crash in PyObject_CheckBuffer on Linux

def test29_vector_datamember(self):
"""Offset calculation of vector datamember"""

import cppyy

cppyy.cppdef("struct VectorDatamember { std::vector<unsigned> v; };")
cppyy.gbl.VectorDatamember # used to crash on Mac arm64


class TestSIGNALS:
def setup_class(cls):
Expand Down

0 comments on commit adc7869

Please sign in to comment.