So, IMO, the simplest solution would be to do what C does to solve this: Create a _werror() which is the actual builtin, then use a normal werror() definition which simply calls _werror() in the standard lib, and allow this werror() to be overridden by roxen_werror().
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Your "solution" would make all calls to builtins slower, I'm afraid.
Well, just the calls to werror(), which, as it happens, is a function which is only called in case of an error, and therefore, is timing uncritical. In general, there's almost no need to override Pike builtins used in the Pike libs. The only case, is exactly this one, the werror() builtin, which is overridden to allow the error output to be postformatted. IMO it's acceptable to slow this one done and make an exception.