-
-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We accidentally made idhash not public by not publishing its header in the right place. This is really generic utility stuff, so we have posted it in the nng/supplemental/util/ directory. We've also removed the ability to remove this -- its a very small amount of additional code, as its just a wrapper on top of mandatory functionality.
- Loading branch information
Showing
8 changed files
with
21 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Copyright 2023 Staysail Systems, Inc. <[email protected]> | ||
# Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
# | ||
# This software is supplied under the terms of the MIT License, a | ||
# copy of which should be located in the distribution where this | ||
|
@@ -141,8 +141,3 @@ if (NNG_TRANSPORT_WS OR NNG_TRANSPORT_WSS) | |
set(NNG_SUPP_BASE64 ON) | ||
set(NNG_SUPP_SHA1 ON) | ||
endif() | ||
|
||
# ID hash API is small wrapper around core, probably should always be enabled unless memory | ||
# is extraordinarily constrained. | ||
option(NNG_SUPP_IDHASH "Enable application IDHASH API" ON) | ||
mark_as_advanced(NNG_SUPP_IDHASH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
= nng_id_map(3supp) | ||
// | ||
// Copyright 2023 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// | ||
// This document is supplied under the terms of the MIT License, a | ||
// copy of which should be located in the distribution where this | ||
|
@@ -17,7 +17,7 @@ nng_id_map - identifier based mapping table | |
[source, c] | ||
---- | ||
#include <nng/nng.h> | ||
#include <nng/supplemental/idhash/idhash.h> | ||
#include <nng/supplemental/util/idhash.h> | ||
typedef struct nng_id_map_s nng_id_map; | ||
|
6 changes: 3 additions & 3 deletions
6
src/supplemental/idhash/idhash.h → include/nng/supplemental/util/idhash.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// | ||
// Copyright 2023 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// | ||
// This software is supplied under the terms of the MIT License, a | ||
// copy of which should be located in the distribution where this | ||
// file was obtained (LICENSE.txt). A copy of the license may also be | ||
// found online at https://opensource.org/licenses/MIT. | ||
// | ||
|
||
#ifndef NNG_SUPPLEMENTAL_IDHASH_IDHASH_H | ||
#define NNG_SUPPLEMENTAL_IDHASH_IDHASH_H | ||
#ifndef NNG_SUPPLEMENTAL_UTIL_IDHASH_H | ||
#define NNG_SUPPLEMENTAL_UTIL_IDHASH_H | ||
|
||
#include <nng/nng.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
# Copyright 2021 Staysail Systems, Inc. <[email protected]> | ||
# Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
# | ||
# This software is supplied under the terms of the MIT License, a | ||
# copy of which should be located in the distribution where this | ||
|
@@ -11,8 +11,7 @@ nng_directory(supplemental) | |
|
||
add_subdirectory(base64) | ||
add_subdirectory(http) | ||
add_subdirectory(idhash) | ||
add_subdirectory(sha1) | ||
add_subdirectory(tls) | ||
add_subdirectory(util) | ||
add_subdirectory(websocket) | ||
add_subdirectory(websocket) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
# | ||
# Copyright 2019 Staysail Systems, Inc. <[email protected]> | ||
# Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
# | ||
# This software is supplied under the terms of the MIT License, a | ||
# copy of which should be located in the distribution where this | ||
# file was obtained (LICENSE.txt). A copy of the license may also be | ||
# found online at https://opensource.org/licenses/MIT. | ||
# | ||
|
||
nng_sources(options.c platform.c) | ||
nng_headers(nng/supplemental/util/options.h nng/supplemental/util/platform.h) | ||
nng_sources(idhash.c options.c platform.c) | ||
nng_headers( | ||
nng/supplemental/util/idhash.h | ||
nng/supplemental/util/options.h | ||
nng/supplemental/util/platform.h) | ||
nng_test(idhash_test) |
6 changes: 4 additions & 2 deletions
6
src/supplemental/idhash/idhash.c → src/supplemental/util/idhash.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// | ||
// Copyright 2023 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// | ||
// This software is supplied under the terms of the MIT License, a | ||
// copy of which should be located in the distribution where this | ||
// file was obtained (LICENSE.txt). A copy of the license may also be | ||
// found online at https://opensource.org/licenses/MIT. | ||
// | ||
|
||
#include "supplemental/idhash/idhash.h" | ||
#include <nng/nng.h> | ||
#include <nng/supplemental/util/idhash.h> | ||
|
||
#include "core/nng_impl.h" | ||
|
||
struct nng_id_map_s { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2023 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// | ||
// This software is supplied under the terms of the MIT License, a | ||
// copy of which should be located in the distribution where this | ||
|
@@ -9,7 +9,7 @@ | |
|
||
#include <nuts.h> | ||
|
||
#include "idhash.h" | ||
#include <nng/supplemental/util/idhash.h> | ||
|
||
void | ||
test_id_basic(void) | ||
|