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

Remove the need for #define CROW_MAIN #280

Merged
merged 3 commits into from
Nov 21, 2021
Merged

Remove the need for #define CROW_MAIN #280

merged 3 commits into from
Nov 21, 2021

Conversation

luca-schlecker
Copy link
Collaborator

Signed-off-by: Luca Schlecker luca.schlecker@hotmail.com

It fixes #273.
This is achieved using the const type qualifier as it gives internal linkage.
"The const qualifier used on a declaration of a non-local non-volatile non-template (since C++14) non-inline (since C++17) variable that is not declared extern gives it internal linkage." (cppreference.com)

The release script didn't need an update, as it just worked with the changes. The mime-type script was changed to reflect the needed changes.

I also deleted all references to #define CROW_MAIN in the documentation, but I didn't take a look at it. Could you please confirm it not breaking anything horribly @The-EDev?

The examples compile fine and my test application also worked without a problem.

This is achieved using the conts type qualifier as it gives internal linkage.
fixes #273

Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
@The-EDev
Copy link
Member

2 PRs that I would consider Historic back to back? Man you need to chill 😂.

I canceled the first CI run due to the force push, I'll review once I'm done looking into the websocket spec (Which I'm just finishing) :)

The-EDev
The-EDev previously approved these changes Nov 21, 2021
Copy link
Member

@The-EDev The-EDev left a comment

Choose a reason for hiding this comment

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

Logic is good, no more references to CROW_MAIN. :)
One thing is that it might be best to put a disclaimer in the README for v0.3 users that they need to put the macro.

@luca-schlecker
Copy link
Collaborator Author

Would you put it in the README or the documentation where the disclaimer saying it was needed was?

@The-EDev
Copy link
Member

The README would probably be best since fewer people check out the documentation. But on the other hand I don't see a problem in putting it in both places.

Signed-off-by: Luca Schlecker <luca.schlecker@hotmail.com>
Copy link
Member

@The-EDev The-EDev left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

@The-EDev
Copy link
Member

Canceled CI since no code change happened, will force merge now

@The-EDev
Copy link
Member

@luca-schlecker was there anything you wanted to do before merging?

@luca-schlecker
Copy link
Collaborator Author

No, there's nothing I want to add. 🚀

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.

Remove CROW_MAIN macro
2 participants