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

About the functions in the utils file. #4

Open
Yujie-Cui opened this issue Nov 13, 2022 · 0 comments
Open

About the functions in the utils file. #4

Yujie-Cui opened this issue Nov 13, 2022 · 0 comments

Comments

@Yujie-Cui
Copy link

Thanks a lot for the code you made public. This is a huge help for me. I want to reuse the code inside.
But I found a problem: in your cache_utils.c file, you use a lot of inline functions.

Shouldn't inline functions be written in header files? If it is written in the implementation file, how does it work?
The compiler compiles each individual implementation file into an object file, which is then linked together. An inline function, on the other hand, requires that the function be inserted directly where it is called. If it is written in the implementation file, when other files are generating the object file, they cannot know the content of the inline function, and cannot be inserted.

Does this seem unreasonable? Not sure if my understanding is correct?

Thanks!!!

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

No branches or pull requests

1 participant