summaryrefslogtreecommitdiff
path: root/algparam.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2005-01-20 04:19:35 +0000
committerweidai <weidai11@users.noreply.github.com>2005-01-20 04:19:35 +0000
commitb3924f2108c0b0825060e91f6fde8202ce35624d (patch)
tree1f61e8bf59450a028415e5a3f08565a6ceb86afe /algparam.h
parent79e29d0de49969af44474cc890cffd7b1d6b1a4b (diff)
downloadcryptopp-git-b3924f2108c0b0825060e91f6fde8202ce35624d.tar.gz
changes done for FIPS-140 lab code drop
Diffstat (limited to 'algparam.h')
-rw-r--r--algparam.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/algparam.h b/algparam.h
index aa10f65d..2f20dd85 100644
--- a/algparam.h
+++ b/algparam.h
@@ -237,10 +237,11 @@ AssignFromHelperClass<T, T> AssignFromHelper(T *pObject, const NameValuePairs &s
// ********************************************************
-// This should allow the linker to discard Integer code if not needed.
-CRYPTOPP_DLL extern bool (*AssignIntToInteger)(const std::type_info &valueType, void *pInteger, const void *pInt);
+// to allow the linker to discard Integer code if not needed.
+typedef bool (CRYPTOPP_API * PAssignIntToInteger)(const std::type_info &valueType, void *pInteger, const void *pInt);
+CRYPTOPP_DLL extern PAssignIntToInteger g_pAssignIntToInteger;
-CRYPTOPP_DLL const std::type_info & IntegerTypeId();
+CRYPTOPP_DLL const std::type_info & CRYPTOPP_API IntegerTypeId();
class CRYPTOPP_DLL AlgorithmParametersBase : public NameValuePairs
{
@@ -292,7 +293,7 @@ public:
void AssignValue(const char *name, const std::type_info &valueType, void *pValue) const
{
// special case for retrieving an Integer parameter when an int was passed in
- if (!(AssignIntToInteger != NULL && typeid(T) == typeid(int) && AssignIntToInteger(valueType, pValue, &m_value)))
+ if (!(g_pAssignIntToInteger != NULL && typeid(T) == typeid(int) && g_pAssignIntToInteger(valueType, pValue, &m_value)))
{
ThrowIfTypeMismatch(name, typeid(T), valueType);
*reinterpret_cast<T *>(pValue) = m_value;