mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Conditionalize uses of C99 restrict keyword
This is part of C99, but not part of Standard C++, so it can't be used unconditionally if the sysprof headers might get included into C++ code. Resolves: https://gitlab.gnome.org/GNOME/sysprof/-/issues/114 Signed-off-by: Simon McVittie <smcv@debian.org>
This commit is contained in:
@ -91,9 +91,11 @@
|
||||
#ifdef __cplusplus
|
||||
#define SYSPROF_BEGIN_DECLS extern "C" {
|
||||
#define SYSPROF_END_DECLS }
|
||||
#define SYSPROF_RESTRICT /* nothing */
|
||||
#else
|
||||
#define SYSPROF_BEGIN_DECLS
|
||||
#define SYSPROF_END_DECLS
|
||||
#define SYSPROF_RESTRICT restrict
|
||||
#endif
|
||||
|
||||
#if defined (__GNUC__)
|
||||
|
||||
Reference in New Issue
Block a user