Add extern C markers (#204)

* Add extern C markers

* Only add extern in header file.
This commit is contained in:
Brian Michel authored and GitHub committed 2023-10-20 08:05:48 +01:00
1 parent c4f2e9938a
commit fade397763
2 files changed
+9

No files matched your search

+1
View File
@@ -15,3 +15,4 @@ DerivedData
.*.sw[nop]
.vscode
@@ -22,6 +22,10 @@
#include <CCryptoBoringSSL.h>
#endif
#if defined(__cplusplus)
extern "C" {
#endif
// MARK:- Pointer type shims
// This section of the code handles shims that change uint8_t* pointers to
// void *s. This is done because Swift does not have the rule that C does, that
@@ -120,4 +124,8 @@ int CCryptoBoringSSLShims_RSA_public_encrypt(int flen, const void *from, void *t
int CCryptoBoringSSLShims_RSA_private_decrypt(int flen, const void *from, void *to,
RSA *rsa, int padding);
#if defined(__cplusplus)
}
#endif // defined(__cplusplus)
#endif // C_CRYPTO_BORINGSSL_SHIMS_H