1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 11:43:15 +02:00

Merge pull request #11267 from NixOS/backport-11244-to-2.24-maintenance

[Backport 2.24-maintenance] allow to c api with older c versions
This commit is contained in:
Robert Hensing 2024-08-08 01:43:24 +02:00 committed by GitHub
commit 935bf1157d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,6 +14,16 @@
#include "nix_api_util.h" #include "nix_api_util.h"
#include <stddef.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 #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -45,7 +55,7 @@ typedef struct EvalState EvalState; // nix::EvalState
* @see nix_value_incref, nix_value_decref * @see nix_value_incref, nix_value_decref
*/ */
typedef struct nix_value nix_value; 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 // Function prototypes
/** /**