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

Function xdr_quad

src/common/xdr.cpp:620–657  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618
619
620bool_t xdr_quad( xdr_t* xdrs, SQUAD* ip)
621{
622/**************************************
623 *
624 * x d r _ q u a d
625 *
626 **************************************
627 *
628 * Functional description
629 * Map from external to internal representation (or vice versa).
630 * A "quad" is represented by two longs.
631 * Currently used only for blobs
632 *
633 **************************************/
634
635 switch (xdrs->x_op)
636 {
637 case XDR_ENCODE:
638 if (PUTLONG(xdrs, reinterpret_cast<SLONG*>(&ip->gds_quad_high)) &&
639 PUTLONG(xdrs, reinterpret_cast<SLONG*>(&ip->gds_quad_low)))
640 {
641 return TRUE;
642 }
643 return FALSE;
644
645 case XDR_DECODE:
646 if (!GETLONG(xdrs, reinterpret_cast<SLONG*>(&ip->gds_quad_high)))
647 {
648 return FALSE;
649 }
650 return GETLONG(xdrs, reinterpret_cast<SLONG*>(&ip->gds_quad_low));
651
652 case XDR_FREE:
653 return TRUE;
654 }
655
656 return FALSE;
657}
658
659
660bool_t xdr_short(xdr_t* xdrs, SSHORT* ip)

Callers 3

xdr_blob_streamFunction · 0.85
CAN_encode_decodeFunction · 0.85
xdr_datumFunction · 0.85

Calls 2

PUTLONGFunction · 0.85
GETLONGFunction · 0.85

Tested by

no test coverage detected