summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdwardKmett <>2013-08-14 21:53:15 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2013-08-14 21:53:15 (GMT)
commit3318b6d167eae6e9ae9d4120c148157d75bf81ec (patch)
tree2424317dae06d84f6c0b011fcd5828c833ab89fb
parentb3599ff1d5b70edc444e8f403c950e2f43c06f61 (diff)
version 0.10.20.10.2
-rw-r--r--CHANGELOG.markdown4
-rw-r--r--bytes.cabal2
-rw-r--r--cbits/i2d.c17
3 files changed, 14 insertions, 9 deletions
diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
index 22e03e4..9ddb323 100644
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -1,3 +1,7 @@
+0.10.2
+------
+* Switched to <stdint.h> to get more portable size correctness.
+
0.10.1
------
* Fixed typo in `cbits/i2d.c` that was causing a linking error.
diff --git a/bytes.cabal b/bytes.cabal
index 56438a9..a0f2b35 100644
--- a/bytes.cabal
+++ b/bytes.cabal
@@ -1,6 +1,6 @@
name: bytes
category: Data, Serialization
-version: 0.10.1
+version: 0.10.2
license: BSD3
cabal-version: >= 1.8
license-file: LICENSE
diff --git a/cbits/i2d.c b/cbits/i2d.c
index fc668f1..5912a44 100644
--- a/cbits/i2d.c
+++ b/cbits/i2d.c
@@ -1,35 +1,36 @@
+#include <stdint.h>
-unsigned long long doubleToWord64(double input) {
+uint64_t doubleToWord64(double input) {
union {
double d;
- unsigned long long l;
+ uint64_t l;
} u;
u.d = input;
return u.l;
}
-double word64ToDouble(unsigned long long input) {
+double word64ToDouble(uint64_t input) {
union {
double d;
- unsigned long long l;
+ uint64_t l;
} u;
u.l = input;
return u.d;
}
-unsigned long long floatToWord32(float input) {
+uint32_t floatToWord32(float input) {
union {
float f;
- unsigned long long l;
+ uint32_t l;
} u;
u.f = input;
return u.l;
}
-float word32ToFloat(unsigned long long input) {
+float word32ToFloat(uint32_t input) {
union {
float f;
- unsigned long long l;
+ uint32_t l;
} u;
u.l = input;
return u.f;