1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

cleanup: get_float convenience helper

more helpers like that can be added as needed
This commit is contained in:
Sergei Golubchik
2024-09-25 14:39:29 +02:00
parent 115d3e050c
commit 949fed514a
7 changed files with 16 additions and 21 deletions

View File

@@ -16,6 +16,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include <string.h>
/*
Macro for reading 32-bit integer from network byte order (big-endian)
@@ -51,4 +52,12 @@
#include "little_endian.h"
#endif
/* convenienve helpers */
static inline float get_float(const void *from)
{
float to;
float4get(to, ((const uchar*)from));
return to;
}
#endif /* MY_BYTEORDER_INCLUDED */