mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 00:02:25 +00:00
Merge pull request #11244 from Mic92/make-c-backwards-compat
allow to c api with older c versions
This commit is contained in:
commit
09199a40cd
@ -14,6 +14,16 @@
|
||||
#include "nix_api_util.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#ifndef __has_c_attribute
|
||||
# define __has_c_attribute(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_c_attribute(deprecated)
|
||||
# define NIX_DEPRECATED(msg) [[deprecated(msg)]]
|
||||
#else
|
||||
# define NIX_DEPRECATED(msg)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -45,7 +55,7 @@ typedef struct EvalState EvalState; // nix::EvalState
|
||||
* @see nix_value_incref, nix_value_decref
|
||||
*/
|
||||
typedef struct nix_value nix_value;
|
||||
[[deprecated("use nix_value instead")]] typedef nix_value Value;
|
||||
NIX_DEPRECATED("use nix_value instead") typedef nix_value Value;
|
||||
|
||||
// Function prototypes
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user