This documentation is deprecated and will no longer be updated. Please use the official documentation at
vanillapdf.readthedocs.io
.
Vanilla.PDF
2.3.0
Cross-platform toolkit for creating and modifying PDF documents
Main Page
Guide
Class Hierarchy
File List
Examples
include
vanillapdf
c_export.h
Go to the documentation of this file.
1
#ifndef _C_EXPORT_H
2
#define _C_EXPORT_H
3
4
#include "
c_platform.h
"
5
12
/*
13
* Calling convention extended explanation
14
* GCC triggers a warning on arm processors "warning: 'cdecl' attribute directive ignored"
15
* From the documentation they state it is only applicable for Intel 386
16
* https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Function-Attributes.html
17
* On the Intel 386, the cdecl attribute causes the compiler to assume that the calling function
18
* will pop off the stack space used to pass arguments.This is useful to override the effects of the - mrtd switch.
19
*/
20
21
#if defined(COMPILER_MICROSOFT_VISUAL_STUDIO) && defined(PROCESSOR_X86)
22
#define CALLING_CONVENTION __cdecl
23
#elif defined(COMPILER_GCC) && defined(PROCESSOR_X86)
24
#define CALLING_CONVENTION __attribute__ ((cdecl))
25
#else
26
#define CALLING_CONVENTION
27
#endif
28
29
#if defined(VANILLAPDF_CONFIGURATION_DLL) && defined(COMPILER_MICROSOFT_VISUAL_STUDIO)
30
#if defined(VANILLAPDF_EXPORTS)
31
#define VANILLAPDF_API __declspec(dllexport)
32
#else
33
#define VANILLAPDF_API __declspec(dllimport)
34
#endif
35
#else
36
#define VANILLAPDF_API
37
#endif
38
39
/*
40
* Deprecation macro for functions
41
* Usage: Place before function declaration
42
* Example: VANILLAPDF_DEPRECATED VANILLAPDF_API error_type Function(...);
43
* Note: For MSVC, requires /W3 or higher warning level
44
* Note: For GCC/Clang, deprecation warnings are enabled by default with -Wall
45
* Note: Use Doxygen \deprecated tag to document replacement function
46
*/
47
#if defined(COMPILER_MICROSOFT_VISUAL_STUDIO)
48
#define VANILLAPDF_DEPRECATED __declspec(deprecated)
49
#elif defined(COMPILER_GCC) || defined(COMPILER_CLANG)
50
#define VANILLAPDF_DEPRECATED __attribute__((deprecated))
51
#else
52
#define VANILLAPDF_DEPRECATED
53
#endif
54
55
#endif
/* _C_EXPORT_H */
c_platform.h
This file contains macro declarations about current platform and compiler.