mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
rust: Remove Rust support from tree
Closes #40469 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
@@ -28,7 +28,6 @@ LIBTOR_APP_A_SOURCES += \
|
||||
src/core/or/orconn_event.c \
|
||||
src/core/or/policies.c \
|
||||
src/core/or/protover.c \
|
||||
src/core/or/protover_rust.c \
|
||||
src/core/or/reasons.c \
|
||||
src/core/or/relay.c \
|
||||
src/core/or/scheduler.c \
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "core/or/versions.h"
|
||||
#include "lib/tls/tortls.h"
|
||||
|
||||
#ifndef HAVE_RUST
|
||||
|
||||
static const smartlist_t *get_supported_protocol_list(void);
|
||||
static int protocol_list_contains(const smartlist_t *protos,
|
||||
protocol_type_t pr, uint32_t ver);
|
||||
@@ -752,5 +750,3 @@ protover_free_all(void)
|
||||
supported_protocol_list = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !defined(HAVE_RUST) */
|
||||
|
||||
@@ -99,13 +99,13 @@ typedef struct proto_entry_t {
|
||||
uint64_t bitmask;
|
||||
} proto_entry_t;
|
||||
|
||||
#if !defined(HAVE_RUST) && defined(TOR_UNIT_TESTS)
|
||||
#if defined(TOR_UNIT_TESTS)
|
||||
STATIC struct smartlist_t *parse_protocol_list(const char *s);
|
||||
STATIC char *encode_protocol_list(const struct smartlist_t *sl);
|
||||
STATIC const char *protocol_type_to_str(protocol_type_t pr);
|
||||
STATIC int str_to_protocol_type(const char *s, protocol_type_t *pr_out);
|
||||
STATIC void proto_entry_free_(proto_entry_t *entry);
|
||||
#endif /* !defined(HAVE_RUST) && defined(TOR_UNIT_TESTS) */
|
||||
#endif /* defined(TOR_UNIT_TESTS) */
|
||||
|
||||
#define proto_entry_free(entry) \
|
||||
FREE_AND_NULL(proto_entry_t, proto_entry_free_, (entry))
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
/* Copyright (c) 2016-2021, The Tor Project, Inc. */
|
||||
/* See LICENSE for licensing information */
|
||||
|
||||
/*
|
||||
* \file protover_rust.c
|
||||
* \brief Provide a C wrapper for functions exposed in /src/rust/protover,
|
||||
* and safe translation/handling between the Rust/C boundary.
|
||||
*/
|
||||
|
||||
#include "core/or/or.h"
|
||||
#include "core/or/protover.h"
|
||||
|
||||
#ifdef HAVE_RUST
|
||||
|
||||
/* Define for compatibility, used in main.c */
|
||||
void
|
||||
protover_free_all(void)
|
||||
{
|
||||
}
|
||||
|
||||
int protover_contains_long_protocol_names_(const char *s);
|
||||
|
||||
/**
|
||||
* Return true if the unparsed protover in <b>s</b> would contain a protocol
|
||||
* name longer than MAX_PROTOCOL_NAME_LENGTH, and false otherwise.
|
||||
*/
|
||||
bool
|
||||
protover_list_is_invalid(const char *s)
|
||||
{
|
||||
return protover_contains_long_protocol_names_(s) != 0;
|
||||
}
|
||||
|
||||
#endif /* defined(HAVE_RUST) */
|
||||
|
||||
Reference in New Issue
Block a user