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

Changing 'return' to block statement, fixing a problem created while transforming inline function to macro #177

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

lzsiga
Copy link

@lzsiga lzsiga commented Jun 25, 2024

The transformation of inline function llist_drop to macro llist_drop introduced a bug: the return statement was meant to leave to inline function, but after the transformation it leaves the function that calls the macro.

Also if your compiler is strict enough, it won't compile, as the macro is called from both 'void' and 'non-void' functions.

The fix is changing the code, from if (cond) return; rest; to if (!cond) { rest; }

lzsiga referenced this pull request Jun 28, 2024
Some old systems can not use inline function
@djzort djzort merged commit 9dc2ca0 into perl5-dbi:master Jul 16, 2024
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.

2 participants