mirror of
https://github.com/Cyan4973/xxHash.git
synced 2026-02-01 09:12:10 +00:00
Merge pull request #657 from Cyan4973/const_f
added __attribute__((const))
This commit is contained in:
37
xxhash.h
37
xxhash.h
@@ -227,18 +227,6 @@ extern "C" {
|
||||
* Contains details on the public xxHash functions.
|
||||
* @{
|
||||
*/
|
||||
/* specific declaration modes for Windows */
|
||||
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
|
||||
# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
|
||||
# ifdef XXH_EXPORT
|
||||
# define XXH_PUBLIC_API __declspec(dllexport)
|
||||
# elif XXH_IMPORT
|
||||
# define XXH_PUBLIC_API __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define XXH_PUBLIC_API /* do nothing */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef XXH_DOXYGEN
|
||||
/*!
|
||||
@@ -317,6 +305,29 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* *************************************
|
||||
* Compiler specifics
|
||||
***************************************/
|
||||
|
||||
/* specific declaration modes for Windows */
|
||||
#if !defined(XXH_INLINE_ALL) && !defined(XXH_PRIVATE_API)
|
||||
# if defined(WIN32) && defined(_MSC_VER) && (defined(XXH_IMPORT) || defined(XXH_EXPORT))
|
||||
# ifdef XXH_EXPORT
|
||||
# define XXH_PUBLIC_API __declspec(dllexport)
|
||||
# elif XXH_IMPORT
|
||||
# define XXH_PUBLIC_API __declspec(dllimport)
|
||||
# endif
|
||||
# else
|
||||
# define XXH_PUBLIC_API /* do nothing */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__GNUC__)
|
||||
# define XXH_CONSTF __attribute__((const))
|
||||
#else
|
||||
# define XXH_CONSTF /* disable */
|
||||
#endif
|
||||
|
||||
/* *************************************
|
||||
* Version
|
||||
***************************************/
|
||||
@@ -333,7 +344,7 @@ extern "C" {
|
||||
*
|
||||
* @return `XXH_VERSION_NUMBER` of the invoked library.
|
||||
*/
|
||||
XXH_PUBLIC_API unsigned XXH_versionNumber (void);
|
||||
XXH_PUBLIC_API XXH_CONSTF unsigned XXH_versionNumber (void);
|
||||
|
||||
|
||||
/* ****************************
|
||||
|
||||
Reference in New Issue
Block a user