You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!!!
The text was updated successfully, but these errors were encountered:
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!!!
The text was updated successfully, but these errors were encountered: