summaryrefslogtreecommitdiff
path: root/integer.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-03-27 06:06:12 -0400
committerJeffrey Walton <noloader@gmail.com>2017-03-27 06:06:12 -0400
commitc305e8812772582edeb6e373b6e34feb59f3799f (patch)
tree84e708e728b0c6a9e3fc8b0594dd896a76d08494 /integer.h
parent0e55f5ac7d98f3c852ace7b4622f40cfa60b629f (diff)
downloadcryptopp-git-c305e8812772582edeb6e373b6e34feb59f3799f.tar.gz
Fix runtime crash when CRYPTOPP_INIT_PRIORITY=0
Couple use of initialization priorities to no NO_OS_DEPENDENCE Add comments explaining what integer does, how it does it, and why we want to inprove on the Singleton pattern as a resource manager. Update documentation.
Diffstat (limited to 'integer.h')
-rw-r--r--integer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/integer.h b/integer.h
index 6e639b2b..41700447 100644
--- a/integer.h
+++ b/integer.h
@@ -8,6 +8,9 @@
//! has two data members. The first is a IntegerSecBlock (a SecBlock<word>) and it is
//! used to hold the representation. The second is a Sign (an enumeration), and it is
//! used to track the sign of the Integer.
+//! \details For details on how the Integer class initializes its function pointers using
+//! InitializeInteger and how it creates Integer::Zero(), Integer::One(), and
+//! Integer::Two(), then see the comments at the top of <tt>integer.cpp</tt>.
//! \since Crypto++ 1.0
#ifndef CRYPTOPP_INTEGER_H
@@ -38,14 +41,12 @@ typedef SecBlock<word, AllocatorWithCleanup<word, true> > IntegerSecBlock;
//! has two data members. The first is a IntegerSecBlock (a SecBlock<word>) and it is
//! used to hold the representation. The second is a Sign (an enumeration), and it is
//! used to track the sign of the Integer.
+//! \details For details on how the Integer class initializes its function pointers using
+//! InitializeInteger and how it creates Integer::Zero(), Integer::One(), and
+//! Integer::Two(), then see the comments at the top of <tt>integer.cpp</tt>.
//! \since Crypto++ 1.0
//! \nosubgrouping
-class CRYPTOPP_DLL Integer
-#if HAVE_GCC_INIT_PRIORITY || HAVE_MSC_INIT_PRIORITY
- : private InitializeInteger, public ASN1Object
-#else
- : public ASN1Object
-#endif
+class CRYPTOPP_DLL Integer : private InitializeInteger, public ASN1Object
{
public:
//! \name ENUMS, EXCEPTIONS, and TYPEDEFS