Permalink
Browse files

Fix hessian_ipc on 64-bit platform

Compilation was failing when:
1) size_t=unsigned long
2) compiler wasn't implicitly expanding unsigned long into long long
  • Loading branch information...
1 parent 74812fa commit 4d1e580e6e9b08e9e2e6fe58f2fe1de4b35fa919 @tea tea committed Oct 23, 2010
Showing with 8 additions and 2 deletions.
  1. +6 −1 src/hessian_ipc/hessian_values.cpp
  2. +2 −1 src/hessian_ipc/hessian_values.h
@@ -132,6 +132,11 @@ void Writer::write(unsigned int value) {
write((int)value);
}
+// write unsigned long
+void Writer::write(unsigned long value) {
+ write((long long)value);
+}
+
// write 64bit integer
void Writer::write(long long value) {
if (-0x08 <= value && value <= 0x0f) {
@@ -462,4 +467,4 @@ void Call::Write(Writer& writer) const {
}
}
-} // namespace hessian_ipc
+} // namespace hessian_ipc
@@ -76,6 +76,7 @@ namespace hessian_ipc {
void write(bool value);
void write(int value);
void write(unsigned int value);
+ void write(unsigned long value);
void write(long long value);
void write(const char* value);
void write(const string& value);
@@ -332,4 +333,4 @@ namespace hessian_ipc {
#include "hessian_writers.h"
-#endif //HESSIAN_VALUES_H
+#endif //HESSIAN_VALUES_H

0 comments on commit 4d1e580

Please sign in to comment.