MCPcopy Create free account
hub / github.com/apache/cloudberry / lo_ntoh64

Function lo_ntoh64

src/interfaces/libpq/fe-lobj.c:1067–1084  ·  view source on GitHub ↗

* lo_ntoh64 * converts a 64-bit integer from network byte order to host byte order */

Source from the content-addressed store, hash-verified

1065 * converts a 64-bit integer from network byte order to host byte order
1066 */
1067static pg_int64
1068lo_ntoh64(pg_int64 net64)
1069{
1070 union
1071 {
1072 pg_int64 i64;
1073 uint32 i32[2];
1074 } swap;
1075 pg_int64 result;
1076
1077 swap.i64 = net64;
1078
1079 result = (uint32) pg_ntoh32(swap.i32[0]);
1080 result <<= 32;
1081 result |= (uint32) pg_ntoh32(swap.i32[1]);
1082
1083 return result;
1084}

Callers 2

lo_lseek64Function · 0.85
lo_tell64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected