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

Moving runtime OS check to compiletime for better performance and size #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gh-matv
Copy link

@gh-matv gh-matv commented Feb 9, 2020

No description provided.

moved runtime checks for OS to compile-time
removed useless header file os.h
Copy link
Owner

@abranhe abranhe left a comment

Choose a reason for hiding this comment

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

Thank you so much for your contribution, but there is a purpose why is like that. This is a clib package, which means that we can add dependencies to it.

We still can remove the deps/ directory since through installation it will automatically download those files from this package abranhe/os.c.

Then why is the folder there?

Just to keep consistency and for people who don't use clib can have access to the library just by downloading the repository.


And you mention also performance, but the running time complexity will still be the same. Size may not, but the use of small package helps with the readability of the library.

cmd = "xdg-open";
}
#ifdef _WIN32
#define cmd "open"
Copy link
Owner

Choose a reason for hiding this comment

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

On Windows, the open command won't work.

@abranhe abranhe removed the wontfix label Feb 9, 2020
@abranhe abranhe added the wontfix label Oct 6, 2021
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