Skip to content

Commit bde280b

Browse files
committed
Revert "Use standard C99 (and Qt) types for 64-bit integers"
This reverts commit 21d9f36.
1 parent 21d9f36 commit bde280b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+442
-526
lines changed

doc/coding.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ someVariable.
2828

2929
Common types:
3030
n integer number: short, unsigned short, int, unsigned int,
31-
int64_t, uint64_t, sometimes char if used as a number
31+
int64, uint64, sometimes char if used as a number
3232
d double, float
3333
f flag
3434
hash uint256

src/base58.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#ifndef BITCOIN_BASE58_H
1616
#define BITCOIN_BASE58_H
1717

18-
#include <stdint.h>
19-
2018
#include <string>
2119
#include <vector>
2220
#include "bignum.h"

src/bignum.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#ifndef BITCOIN_BIGNUM_H
66
#define BITCOIN_BIGNUM_H
77

8-
#include <stdint.h>
9-
108
#include <stdexcept>
119
#include <vector>
1210
#include <openssl/bn.h>
@@ -83,12 +81,12 @@ class CBigNum : public BIGNUM
8381
CBigNum(short n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
8482
CBigNum(int n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
8583
CBigNum(long n) { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
86-
CBigNum(int64_t n) { BN_init(this); setint64(n); }
84+
CBigNum(int64 n) { BN_init(this); setint64(n); }
8785
CBigNum(unsigned char n) { BN_init(this); setulong(n); }
8886
CBigNum(unsigned short n) { BN_init(this); setulong(n); }
8987
CBigNum(unsigned int n) { BN_init(this); setulong(n); }
9088
CBigNum(unsigned long n) { BN_init(this); setulong(n); }
91-
CBigNum(uint64_t n) { BN_init(this); setuint64(n); }
89+
CBigNum(uint64 n) { BN_init(this); setuint64(n); }
9290
explicit CBigNum(uint256 n) { BN_init(this); setuint256(n); }
9391

9492
explicit CBigNum(const std::vector<unsigned char>& vch)
@@ -122,12 +120,12 @@ class CBigNum : public BIGNUM
122120
return (n > std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
123121
}
124122

125-
void setint64(int64_t n)
123+
void setint64(int64 n)
126124
{
127125
unsigned char pch[sizeof(n) + 6];
128126
unsigned char* p = pch + 4;
129127
bool fNegative = false;
130-
if (n < (int64_t)0)
128+
if (n < (int64)0)
131129
{
132130
n = -n;
133131
fNegative = true;
@@ -157,7 +155,7 @@ class CBigNum : public BIGNUM
157155
BN_mpi2bn(pch, p - pch, this);
158156
}
159157

160-
void setuint64(uint64_t n)
158+
void setuint64(uint64 n)
161159
{
162160
unsigned char pch[sizeof(n) + 6];
163161
unsigned char* p = pch + 4;

0 commit comments

Comments
 (0)