MagickWand 7.1.2
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
method-attribute.h
1/*
2 Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3 dedicated to making software imaging solutions freely available.
4
5 You may not use this file except in compliance with the License. You may
6 obtain a copy of the License at
7
8 https://imagemagick.org/script/license.php
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 MagickWand method attributes.
17*/
18#ifndef MAGICKWAND_METHOD_ATTRIBUTE_H
19#define MAGICKWAND_METHOD_ATTRIBUTE_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#if defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
26# define WandPrivate
27# if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB)
28# define _MAGICKDLL_
29# endif
30# if defined(_MAGICKDLL_)
31# if !defined(_MAGICKLIB_)
32# if defined(__clang__) || defined(__GNUC__)
33# define WandExport __attribute__ ((dllimport))
34# else
35# define WandExport __declspec(dllimport)
36# endif
37# else
38# if defined(__clang__) || defined(__GNUC__)
39# define WandExport __attribute__ ((dllexport))
40# else
41# define WandExport __declspec(dllexport)
42# endif
43# endif
44# else
45# define WandExport
46# endif
47# if defined(_VISUALC_)
48# pragma warning(disable : 4018)
49# pragma warning(disable : 4068)
50# pragma warning(disable : 4244)
51# pragma warning(disable : 4142)
52# pragma warning(disable : 4800)
53# pragma warning(disable : 4786)
54# pragma warning(disable : 4996)
55# endif
56#else
57# if defined(__clang__) || (__GNUC__ >= 4)
58# define WandExport __attribute__ ((visibility ("default")))
59# define WandPrivate __attribute__ ((visibility ("hidden")))
60# else
61# define WandExport
62# define WandPrivate
63# endif
64#endif
65
66#define MagickWandSignature 0xabacadabUL
67#if !defined(MagickPathExtent)
68# define MagickPathExtent 4096
69#endif
70
71#if defined(MAGICKCORE_HAVE___ATTRIBUTE__)
72# define wand_aligned(x) __attribute__((aligned(x)))
73# define wand_attribute __attribute__
74# define wand_unused(x) wand_unused_ ## x __attribute__((unused))
75# define wand_unreferenced(x) /* nothing */
76#elif defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__)
77# define wand_aligned(x) __declspec(align(x))
78# define wand_attribute(x) /* nothing */
79# define wand_unused(x) x
80# define wand_unreferenced(x) (x)
81#else
82# define wand_aligned(x) /* nothing */
83# define wand_attribute(x) /* nothing */
84# define wand_unused(x) x
85# define wand_unreferenced(x) /* nothing */
86#endif
87
88#if !defined(__clang__) && (defined(__GNUC__) && (__GNUC__) > 4)
89# define wand_alloc_size(x) __attribute__((__alloc_size__(x)))
90# define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y)))
91#else
92# define wand_alloc_size(x) /* nothing */
93# define wand_alloc_sizes(x,y) /* nothing */
94#endif
95
96#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__) > 4)
97# define wand_cold_spot __attribute__((__cold__))
98# define wand_hot_spot __attribute__((__hot__))
99#else
100# define wand_cold_spot
101# define wand_hot_spot
102#endif
103
104#if defined(__cplusplus) || defined(c_plusplus)
105}
106#endif
107
108#endif