Is it possible to get the current function using a macro in C?
Is there a C macro that gives you the current function pointer(not the string name)? Something like: void scheduleEvent() { ... } void doSomething() { ... scheduleEvent(__FUNC_PTR__); } Or more to the point, something that could be used in a macro: #define scheduleCurrentFunc() scheduleEvent(__FUNC_PTR__); void doSomething() { ... scheduleCurrentFunc(); }
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.