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

add id warning on save_safe_struct #327

Merged

Conversation

yasirroni
Copy link
Contributor

Add msgid to warning on save_safe_struct.

'oct2py:pyeval:save_safe_struct:UnacceptableType'

This allow user to ignore warnings using:

m = Oct2Py()
m.eval("warning('off', 'Octave:classdef-to-struct');")
m.eval("warning('off', 'oct2py:pyeval:save_safe_struct:UnacceptableType');")

The only downside of this PR is extra step of:

        warn_state = warning('off', 'all');
        ...
        warning(warn_state);

This is due to bug warning "save: wrong type argument 'function handle'". I reported it to https://savannah.gnu.org/bugs/index.php?66060 so that we can remove the warn_state code later if octave fix that bug.

__

I really need this because some user store @func, multiple of that is struct.

@yasirroni
Copy link
Contributor Author

Hi @blink1073, can you look at this? Do you think you will merge or reject this? It is indeed add 2 actions, that is setting warning on and off each time we send something from Octave. Thank you.

@blink1073 blink1073 added the bug label Aug 12, 2024
Copy link
Owner

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

Thanks! I'll make a release with this tomorrow.

@blink1073 blink1073 merged commit f53d2ba into blink1073:main Aug 18, 2024
6 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants