Graphviz 14.0.2~dev.20251015.0935
Loading...
Searching...
No Matches
api.h File Reference

macro for API hiding/exposing More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRIVATE
 
#define UTIL_API   PRIVATE
 

Macro Definition Documentation

◆ PRIVATE

#define PRIVATE
Value:
/* Nothing required. In other toolchains, symbol hiding is the \
default. */

hide a symbol outside of its containing library

This should be used for functions that are only called from within the same containing library. That is, functions that would be static if the entire library was within a single translation unit. The purpose of this annotation is to reduce symbol conflicts and symbol table bloat in downstream targets that do not need this symbol exposed.

Definition at line 16 of file api.h.

◆ UTIL_API

#define UTIL_API   PRIVATE

use this macro to hide libutil’s symbols by default

The expectation is that users of this library (applications, shared libraries, or static libraries) want to call some of the exposed functions but not re-export them to their users. This annotation is only correct while the containing library is built statically. If it were built as a shared library, API symbols would need to have default visibility (and thus be unavoidably re-exported) in order to be callable.

Definition at line 27 of file api.h.