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

Don't repeat CallInfo typedef in luacore.h #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bjornbm
Copy link

@bjornbm bjornbm commented Mar 10, 2025

Maybe the better alternative to pallene-lang/pallene#646

@@ -23,6 +23,7 @@ BEGIN {

}

/^typedef struct CallInfo CallInfo;/ { next } # Skip repeated typedefs
Copy link
Member

Choose a reason for hiding this comment

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

I agree this is much better than the other PR.

The only nitpick is that we already have logic for skipping lines with an include. But here we're using "next" and there we're using "if not then print". I don't have a preference but it would be nice if they worked the same way.

Copy link
Author

Choose a reason for hiding this comment

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

I can offer this which is perhaps clearer in the logic:

/^typedef struct CallInfo CallInfo;/ { next }  # Skip repeated typedefs
is_core_include() { next }  # Skip includes for files being merged
{ print }  # Print all other lines

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