Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4 bugs #4228

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

4 bugs #4228

wants to merge 5 commits into from

Conversation

Mikkel-Skofelt
Copy link

No description provided.

#bytearray()
#bytes()

test t = test()
Copy link
Contributor

@da-woods da-woods Jun 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem here is that the line is split into

test t; // run the instant the module loads, in a state possibly without the GIL, almost certainly before pyo is set to up

t = test(); // run later, with the GIL during the module setup

I.e. the 0-argument constructor is called twice. This happens any time you use a c++ object (at global, local, or class scope, or invisibly in a Cython temp) and needs a significant change in how Cython stores C++ objects to fix.

#4225 should eventually fix it, but isn't even close to done at the moment (and of course no guarantee that it's suitable even if/when it is done). For now you need to heap allocate.

testclass()
void a()
void a(unsigned int i)
cppclass testclass2(testclass): # a() is dropped
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue here is that

def declare_inherited_cpp_attributes(self, base_class):

doesn't copy overloaded_alternativesproperly. Actually fixing it looks slightly fiddly (and I've run out of time at the moment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants