Macaulay2 Engine
Loading...
Searching...
No Matches
engine-includes.hpp File Reference

Engine-wide include prelude — a single point of truth for portability shims. More...

#include <M2/config.h>
#include "interface/m2-types.h"
#include <M2/gc-include.h>

Go to the source code of this file.

Detailed Description

Engine-wide include prelude — a single point of truth for portability shims.

Note
AI-generated documentation. Verify against the source before relying on it.

The header wraps four pieces of glue: M2/config.h (autotools / CMake HAVE_* macros), interface/m2-types.h (the cross-language M2_arrayint, M2_string, ... types shared with the interpreter — skipped when SAFEC_EXPORTS is set, signalling that scc1 is generating the C ABI), the right fixed-width-int header (<stdint.h> if HAVE_STDINT_H, else <inttypes.h>, with __STDC_LIMIT_MACROS defined first so C++ sees UINT64_MAX and friends), and M2/gc-include.h — but only when compiled as C (C++ defers GC integration to newdelete.hpp and its overloaded operator new).

The whole body sits inside an IWYU pragma: begin_exports/end_exports pair so include-what-you-use treats the bundled headers as re-exported: files including engine-includes.hpp count as including the inner declarations and IWYU will not suggest pulling them in directly. Avoid adding new entries here unless they are genuinely needed by ~90% of the engine; touching this file recompiles everything downstream.

See also
newdelete.hpp
interface/m2-types.h

Definition in file engine-includes.hpp.