2022-09-16 10:32:12 +00:00
|
|
|
// EVMC: Ethereum Client-VM Connector API.
|
|
|
|
// Copyright 2018 The EVMC Authors.
|
|
|
|
// Licensed under the Apache License, Version 2.0.
|
2019-07-08 14:04:52 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* A collection of helper macros to handle some non-portable features of C/C++ compilers.
|
|
|
|
*
|
|
|
|
* @addtogroup helpers
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def EVMC_EXPORT
|
|
|
|
* Marks a function to be exported from a shared library.
|
|
|
|
*/
|
|
|
|
#if defined _MSC_VER || defined __MINGW32__
|
|
|
|
#define EVMC_EXPORT __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define EVMC_EXPORT __attribute__((visibility("default")))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @def EVMC_NOEXCEPT
|
|
|
|
* Safe way of marking a function with `noexcept` C++ specifier.
|
|
|
|
*/
|
2021-03-23 23:39:47 +00:00
|
|
|
#ifdef __cplusplus
|
2019-07-08 14:04:52 +00:00
|
|
|
#define EVMC_NOEXCEPT noexcept
|
|
|
|
#else
|
|
|
|
#define EVMC_NOEXCEPT
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/** @} */
|