softglow's notebook

Dispatches from the Depths of a Super Nintendo

Solved: The Mystery of Privilege

Just a quick note, since privileged is actually not a C++ keyword, the thought finally crossed my mind: what if it’s a macro?

One quick grep later, there was one match in emulator/emulator.hpp line 72-76 (for anyone who hasn’t read the whole blog, this is the higan v093 source I’m talking about):

#if defined(DEBUGGER)
    #define privileged public
#else
    #define privileged private
#endif

Yeah, it looks like a good day to be humble about my programming ability. It only took me, like, a month to come up with that idea.