summaryrefslogtreecommitdiff
path: root/core/src/fxcrt/fx_extension.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r--core/src/fxcrt/fx_extension.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 4951fbde9c..d64a06d08b 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -7,7 +7,6 @@
#include "../../include/fxcrt/fx_basic.h"
#include "../../include/fxcrt/fx_ext.h"
#include "extension.h"
-
#if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
#include <wincrypt.h>
#else
@@ -51,7 +50,9 @@ IFX_MemoryStream* FX_CreateMemoryStream(uint8_t* pBuffer,
IFX_MemoryStream* FX_CreateMemoryStream(FX_BOOL bConsecutive) {
return new CFX_MemoryStream(bConsecutive);
}
-
+#ifdef __cplusplus
+extern "C" {
+#endif
FX_FLOAT FXSYS_tan(FX_FLOAT a) {
return (FX_FLOAT)tan(a);
}
@@ -188,7 +189,12 @@ FX_DWORD FX_HashCode_String_GetW(const FX_WCHAR* pStr,
}
return dwHashCode;
}
-
+#ifdef __cplusplus
+}
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
void* FX_Random_MT_Start(FX_DWORD dwSeed) {
FX_LPMTRANDOMCONTEXT pContext = FX_Alloc(FX_MTRANDOMCONTEXT, 1);
pContext->mt[0] = dwSeed;
@@ -291,4 +297,6 @@ void FX_Random_GenerateCrypto(FX_DWORD* pBuffer, int32_t iCount) {
FX_Random_GenerateBase(pBuffer, iCount);
#endif
}
-
+#ifdef __cplusplus
+}
+#endif