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

use SWIG arginit #1519

Merged
merged 1 commit into from
Mar 5, 2021
Merged

use SWIG arginit #1519

merged 1 commit into from
Mar 5, 2021

Conversation

stevengj
Copy link
Collaborator

@stevengj stevengj commented Mar 5, 2021

Whenever we use a SWIG freearg typemap, we need to pair it with a SWIG arginit typemap to ensure that errors don't cause segfaults. Fixes #1518.

@stevengj
Copy link
Collaborator Author

stevengj commented Mar 5, 2021

(With this PR, passing a floating-point value for subpixel_maxeval produces an exception TypeError: in method 'create_structure_and_set_materials', argument 14 of type 'int'.)

@stevengj stevengj merged commit e193c59 into master Mar 5, 2021
@stevengj stevengj deleted the arginit branch March 5, 2021 22:06
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
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.

Passing a Python float in the subpixel_maxeval arg causes a segfault
1 participant