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

debug mode context check #350

Closed
wants to merge 2 commits into from

Conversation

nirit100
Copy link
Contributor

steve-s worked with me on this with during the PyPy sprint in Düsseldorf.
It's work in progress, just a semi-working hacky test.

DHPy dh_result = f(dctx, dh_self);
DHPy_close_and_check(dctx, dh_self);
((HPyDebugInfo*)dctx->_private)->is_active = false;
HPyContext *dctx_copy = malloc(sizeof(struct _HPyContext_s));
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably worth checking if malloc succeeded and raising HPyErr_NoMemory if not. See:

hp = (_HPyTracker_s*)malloc(sizeof(_HPyTracker_s));
if (hp == NULL) {
HPyErr_NoMemory(ctx);
return _hp2ht(0);
}

@steve-s
Copy link
Contributor

steve-s commented Sep 23, 2022

Follow-up PR: #363

@steve-s steve-s closed this Sep 23, 2022
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.

3 participants