]> git.codecow.com Git - Monocypher.git/commit
Allow headers to declare a C++ namespace
authorJens Alfke <jens@mooseyard.com>
Wed, 12 Jan 2022 19:36:44 +0000 (11:36 -0800)
committerLoup Vaillant <github-is-valid@loup-vaillant.fr>
Mon, 17 Jan 2022 23:37:24 +0000 (00:37 +0100)
commitd68589e6f5d258b4782e88d003ebd00326f275d0
tree43dc80acb21b124d7fbbf25b1969192ac53f66db
parent799e2cc6724b1bf6d6b22279d9aca6851f1a4040
Allow headers to declare a C++ namespace

If the preprocessor symbol `MONOCYPHER_CPP_NAMESPACE` is defined,
the Monocypher headers will be wrapped in a C++ namespace instead of
in `extern "C"`. The name of the namespace is the value of the symbol.

This requires also compiling Monocypher's .c files as C++, either by:
- Using a compiler option like `--x c++`;
- Using an IDE setting, like the Identity & Type inspector in Xcode;
- Putting `#include "monocypher.c" in a C++ file
AUTHORS.md
src/deprecated/aead-incr.c
src/deprecated/aead-incr.h
src/deprecated/chacha20.c
src/deprecated/chacha20.h
src/monocypher.c
src/monocypher.h
src/optional/monocypher-ed25519.c
src/optional/monocypher-ed25519.h