MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / xdr_u_short

Function xdr_u_short

src/common/xdr.cpp:823–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

821
822
823bool_t xdr_u_short(xdr_t* xdrs, u_short* ip)
824{
825/**************************************
826 *
827 * x d r _ u _ s h o r t
828 *
829 **************************************
830 *
831 * Functional description
832 * Map from external to internal representation (or vice versa).
833 *
834 **************************************/
835 SLONG temp;
836
837 switch (xdrs->x_op)
838 {
839 case XDR_ENCODE:
840 temp = *ip;
841 return PUTLONG(xdrs, &temp);
842
843 case XDR_DECODE:
844 if (!GETLONG(xdrs, &temp))
845 return FALSE;
846 *ip = (unsigned) temp;
847 return TRUE;
848
849 case XDR_FREE:
850 return TRUE;
851 }
852
853 return FALSE;
854}
855
856
857bool_t xdr_wrapstring(xdr_t* xdrs, SCHAR** strp)

Callers 1

xdr_blob_streamFunction · 0.85

Calls 2

PUTLONGFunction · 0.85
GETLONGFunction · 0.85

Tested by

no test coverage detected