ScummVM
forbidden.h File Reference

Go to the source code of this file.

Detailed Description

This header file is meant to help ensure that engines and infrastructure code do not make use of certain "forbidden" APIs, such as fopen(), setjmp(), etc. This is achieved by re-#defining various symbols to a "garbage" string which then triggers a compiler error.

Backend files may #define FORBIDDEN_SYMBOL_ALLOW_ALL if they have to access functions like fopen, fread etc. Regular code, esp. code in engines/, should never do that. To ease transition, though, we allow re-enabling selected symbols in frontend code. However, this should only be used as a temporary measure. Especially new code should avoid this at all costs.

Definition in file forbidden.h.