funi.h.stpl (757B)
1 #pragma once 2 #if defined _WIN32 || defined __CYGWIN__ 3 #ifdef BUILDING_DLL 4 #ifdef __GNUC__ 5 #define DLL_PUBLIC __attribute__ ((dllexport)) 6 #else 7 #define DLL_PUBLIC __declspec(dllexport) 8 #endif 9 #else 10 #ifdef __GNUC__ 11 #define DLL_PUBLIC __attribute__ ((dllimport)) 12 #else 13 #define DLL_PUBLIC __declspec(dllimport) 14 #endif 15 #endif 16 #define DLL_LOCAL 17 #else 18 #if __GNUC__ >= 4 19 #define DLL_PUBLIC __attribute__ ((visibility ("default"))) 20 #define DLL_LOCAL __attribute__ ((visibility ("hidden"))) 21 #else 22 #define DLL_PUBLIC 23 #define DLL_LOCAL 24 #endif 25 #endif 26 27 #ifdef __cplusplus 28 extern "C" 29 { 30 #endif 31 %for i in range(maxfuni): 32 DLL_PUBLIC int func{{i}}(int a); 33 %end 34 #ifdef __cplusplus 35 }//extern 36 #endif