FFI: Extract common codeunit types into a rust/types.h header
This commit is contained in:
parent
253ea6db38
commit
cb294bbda0
|
@ -1,6 +1,8 @@
|
|||
#ifndef LIBRUSTZCASH_INCLUDE_H_
|
||||
#define LIBRUSTZCASH_INCLUDE_H_
|
||||
|
||||
#include "rust/types.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
@ -29,11 +31,6 @@ static_assert(alignof(HistoryEntry) == 1, "HistoryEntry struct alignment is not
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
typedef uint16_t codeunit;
|
||||
#else
|
||||
typedef uint8_t codeunit;
|
||||
#endif
|
||||
|
||||
void librustzcash_to_scalar(const unsigned char *input, unsigned char *result);
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright (c) 2020 The Zcash developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
||||
|
||||
#ifndef RUST_TYPES_H_
|
||||
#define RUST_TYPES_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef WIN32
|
||||
typedef uint16_t codeunit;
|
||||
#else
|
||||
typedef uint8_t codeunit;
|
||||
#endif
|
||||
|
||||
#endif // RUST_TYPES_H_
|
|
@ -5,6 +5,8 @@
|
|||
#ifndef TRACING_INCLUDE_H_
|
||||
#define TRACING_INCLUDE_H_
|
||||
|
||||
#include "rust/types.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -12,11 +14,6 @@
|
|||
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
typedef uint16_t codeunit;
|
||||
#else
|
||||
typedef uint8_t codeunit;
|
||||
#endif
|
||||
|
||||
struct TracingHandle;
|
||||
typedef struct TracingHandle TracingHandle;
|
||||
|
|
Loading…
Reference in New Issue