First off, the language marker is C++, he's already mentioned that he's doing this IN C++ and desires C compatibility. That means the public facing interface, not the internal implementation details, need to be something C can handle."Oh hey, look, now when I refactor out that doLogic call to another function it doesn't magically start seeing 4 or 8 or whatever the pointer size is randomly. All because I didn't use sizeof in an easly breakable place!"
Wow, a lot of assumptions! I suggest you read the OP. The takeaways are really simple: "library" + "C". Not c++.
Using sizeof in a manner that is almost universally recognized as being seriosly error prone is A Code Smell(tm) and should be avoided. One common example of this is exactly what was demonstrated above.
I assume the "library" + "C" thing was in reference to refactoring??? In which case: Refactoring is something you should do in any language, it's a means of cleaning up, enhancing, and generally making code better. Which can include moving where a function call happens.
As an additional note I've also removed your other post, keep it constructive and technical. I should also note that this topic is in General Programming. Not For Beginners, as such we generally allow the discussion to range a bit further from the original topic. Note that if this was for beginners, I would be extra hard on the sizeof issue.