File: mxh.h

package info (click to toggle)
python-mxstack 0.3.0-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 204 kB
  • ctags: 272
  • sloc: ansic: 1,329; python: 163; makefile: 44; sh: 19
file content (54 lines) | stat: -rw-r--r-- 1,420 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef MXH_H
#define MXH_H

/* 
  mxh.h -- Generic header file for all mx Extenstions

  This file should be included by every mx Extension header file
  and the C file.

  (c) Marc-Andre Lemburg; All Rights Reserved; mailto: mal@lemburg.com
  See the documentation for further copyright information or contact
  the author.

*/

/*
  Macros to control export and import of DLL symbols.

  We use our own definitions since Python's don't allow specifying
  both imported and exported symbols at the same time; these defines
  haven't been thoroughly tested yet, patches are most welcome :-)

*/

/* Macro to "mark" a symbol for DLL export */

#if defined(_MSC_VER) && _MSC_VER > 850 /* MS VC++ 2.0 and up */
# ifdef __cplusplus
#   define MX_EXPORT(type) extern "C" type __declspec(dllexport) 
# else
#   define MX_EXPORT(type) extern type __declspec(dllexport) 
# endif
#elif defined(__WATCOMC__)
#   define MX_EXPORT(type) extern type __export 
#else
#   define MX_EXPORT(type) extern type
#endif

/* Macro to "mark" a symbol for DLL import */

#if defined(__BORLANDC__)
#   define MX_IMPORT(type) extern type __import
#elif defined(_MSC_VER) && _MSC_VER > 850 /* MS VC++ 2.0 and up */
# ifdef __cplusplus
#   define MX_IMPORT(type) extern "C" type __declspec(dllimport)
# else
#   define MX_IMPORT(type) extern type __declspec(dllimport)
# endif
#else
#   define MX_IMPORT(type) extern type
#endif

/* EOF */
#endif