diff options
Diffstat (limited to 'ndb/include/ndbapi/NdbRecAttr.hpp')
-rw-r--r-- | ndb/include/ndbapi/NdbRecAttr.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp index 43883cc91f2..e2c58731c35 100644 --- a/ndb/include/ndbapi/NdbRecAttr.hpp +++ b/ndb/include/ndbapi/NdbRecAttr.hpp @@ -312,7 +312,9 @@ inline Int64 NdbRecAttr::int64_value() const { - return *(Int64*)theRef; + Int64 val; + memcpy(&val,theRef,8); + return val; } inline @@ -340,7 +342,9 @@ inline Uint64 NdbRecAttr::u_64_value() const { - return *(Uint64*)theRef; + Uint64 val; + memcpy(&val,theRef,8); + return val; } inline @@ -368,14 +372,18 @@ inline float NdbRecAttr::float_value() const { - return *(float*)theRef; + float val; + memcpy(&val,theRef,sizeof(val)); + return val; } inline double NdbRecAttr::double_value() const { - return *(double*)theRef; + double val; + memcpy(&val,theRef,sizeof(val)); + return val; } inline |