| 832 | /***********************************************************************/ |
| 833 | template <class TYPE> |
| 834 | void TYPVAL<TYPE>::SetBinValue(void *p) |
| 835 | { |
| 836 | #if defined(UNALIGNED_OK) |
| 837 | // x86 can cast non-aligned memory directly |
| 838 | Tval = *(TYPE *)p; |
| 839 | #else |
| 840 | // Prevent unaligned memory access on MIPS and ArmHF platforms. |
| 841 | // Make use of memcpy instead of straight pointer dereferencing. |
| 842 | // Currently only used by WriteColumn of binary files. |
| 843 | // From original author: Vicentiu Ciorbaru <vicentiu@mariadb.org> |
| 844 | memcpy(&Tval, p, sizeof(TYPE)); |
| 845 | #endif |
| 846 | Null = false; |
| 847 | } // end of SetBinValue |
| 848 | |
| 849 | /***********************************************************************/ |
| 850 | /* GetBinValue: fill a buffer with the internal binary value. */ |
no outgoing calls
no test coverage detected