mirror of
https://github.com/TokTok/c-toxcore
synced 2026-09-01 20:08:29 +00:00
cleanup: Use tox_attributes.h in tox_private.h and install it.
Only when using experimental APIs.
This commit is contained in:
@@ -18,6 +18,7 @@ genrule(
|
||||
outs = [
|
||||
"tox/toxav.h",
|
||||
"tox/tox.h",
|
||||
"tox/tox_attributes.h",
|
||||
"tox/tox_dispatch.h",
|
||||
"tox/tox_events.h",
|
||||
"tox/tox_log_level.h",
|
||||
|
||||
@@ -391,6 +391,7 @@ set(toxcore_API_HEADERS
|
||||
${toxcore_SOURCE_DIR}/toxcore/tox_options.h^tox)
|
||||
if(EXPERIMENTAL_API)
|
||||
set(toxcore_API_HEADERS ${toxcore_API_HEADERS}
|
||||
${toxcore_SOURCE_DIR}/toxcore/tox_attributes.h^tox
|
||||
${toxcore_SOURCE_DIR}/toxcore/tox_dispatch.h^tox
|
||||
${toxcore_SOURCE_DIR}/toxcore/tox_events.h^tox
|
||||
${toxcore_SOURCE_DIR}/toxcore/tox_private.h^tox
|
||||
|
||||
@@ -4,6 +4,7 @@ load("@rules_fuzzing//fuzzing:cc_defs.bzl", "cc_fuzz_test")
|
||||
exports_files(
|
||||
srcs = [
|
||||
"tox.h",
|
||||
"tox_attributes.h",
|
||||
"tox_dispatch.h",
|
||||
"tox_events.h",
|
||||
"tox_log_level.h",
|
||||
@@ -1318,6 +1319,7 @@ cc_library(
|
||||
":os_memory",
|
||||
":os_random",
|
||||
":state",
|
||||
":tox_attributes",
|
||||
":tox_log_level",
|
||||
":tox_options",
|
||||
":util",
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* Copyright © 2022-2025 The TokTok team.
|
||||
* Copyright © 2022-2026 The TokTok team.
|
||||
*/
|
||||
|
||||
/**
|
||||
* nonnull attributes for GCC/Clang and Cimple.
|
||||
*
|
||||
* This file is a modified version of c-toxcore/toxcore/attributes.h with a
|
||||
* `tox_` prefix added to the macros to avoid conflicts with client code.
|
||||
*/
|
||||
#ifndef C_TOXCORE_TOXCORE_TOX_ATTRIBUTES_H
|
||||
#define C_TOXCORE_TOXCORE_TOX_ATTRIBUTES_H
|
||||
@@ -20,12 +17,6 @@
|
||||
#define _Nullable
|
||||
#endif
|
||||
|
||||
#ifdef SPARSE
|
||||
#define tox_bitwise __attribute__((bitwise))
|
||||
#else
|
||||
#define tox_bitwise
|
||||
#endif
|
||||
|
||||
//!TOKSTYLE+
|
||||
|
||||
#endif /* C_TOXCORE_TOXCORE_TOX_ATTRIBUTES_H */
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "attributes.h"
|
||||
#include "tox.h"
|
||||
#include "tox_attributes.h"
|
||||
#include "tox_options.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user