C-Pluff C API 0.2.0
Macros
cpluffdef.h File Reference

Common defines shared by C-Pluff C and C++ APIs. More...

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

Go to the source code of this file.

Macros

#define CP_VERSION
 The C-Pluff release version string.
 
#define CP_VERSION_MAJOR
 The major version number component of the release version.
 
#define CP_VERSION_MINOR
 The minor version number component of the release version.
 
#define CP_EXPORT
 Declares a symbol to be exported for inter-module usage.
 
#define CP_IMPORT
 Declares a symbol to be imported from another module.
 
#define CP_HIDDEN
 Declares a symbol hidden from other modules.
 
#define CP_GCC_PURE
 Declares a function as pure function having no side effects.
 
#define CP_GCC_NONNULL(...)
 Specifies that some pointer arguments to a function should have non-NULL values.
 

Detailed Description

Common defines shared by C-Pluff C and C++ APIs.

This file is automatically included by the top level C and C++ API header files. There should be no need to include it explicitly.

Macro Definition Documentation

◆ CP_VERSION

#define CP_VERSION

The C-Pluff release version string.

This string identifies a specific version of the C-Pluff distribution. Compile time software compatibility checks should use CP_VERSION_MAJOR and CP_VERSION_MINOR instead.

◆ CP_VERSION_MAJOR

#define CP_VERSION_MAJOR

The major version number component of the release version.

This is an integer.

◆ CP_VERSION_MINOR

#define CP_VERSION_MINOR

The minor version number component of the release version.

This is an integer.

◆ CP_EXPORT

#define CP_EXPORT

Declares a symbol to be exported for inter-module usage.

When compiling the module which defines the symbol this macro should be placed at the start of the symbol declaration to ensure that the symbol is exported to other modules. However, when compiling other modules the declaration of the symbol should start with CP_IMPORT. See the example of how to do this.

◆ CP_IMPORT

#define CP_IMPORT

Declares a symbol to be imported from another module.

When compiling a module which uses the symbol this macro should be placed at the start of the symbol declaration to ensure that the symbol is imported from the defining module. However, when compiling the defining module the declaration of the symbol should start with CP_EXPORT. See the example of how to do this.

◆ CP_HIDDEN

#define CP_HIDDEN

Declares a symbol hidden from other modules.

This macro should be placed at the start of the symbol declaration to hide the symbol from other modules (if supported by the platform). This macro is not intended to be used with symbols declared as "static" which are already internal to the object file. Some platforms do not support hiding of symbols and therefore unique prefixes should be used for global symbols internal to the module even when they are declared using this macro.

◆ CP_GCC_PURE

#define CP_GCC_PURE

Declares a function as pure function having no side effects.

This attribute is supported in GCC since version 2.96. Such functions can be subject to common subexpression elimination and loop optimization.

◆ CP_GCC_NONNULL

#define CP_GCC_NONNULL (   ...)

Specifies that some pointer arguments to a function should have non-NULL values.

Takes a variable length list of argument indexes as arguments. This attribute is supported in GCC since version 3.3. It can be used for enhanced error checking and some optimizations.


Generated on Thu Mar 14 2024 19:33:41 for C-Pluff C API by doxygen 1.9.8