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

Function xdr_int

src/common/xdr.cpp:516–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514
515
516bool_t xdr_int(xdr_t* xdrs, int* ip)
517{
518/**************************************
519 *
520 * x d r _ i n t
521 *
522 **************************************
523 *
524 * Functional description
525 * Map from external to internal representation (or vice versa).
526 *
527 **************************************/
528 SLONG temp;
529
530 switch (xdrs->x_op)
531 {
532 case XDR_ENCODE:
533 temp = *ip;
534 return PUTLONG(xdrs, &temp);
535
536 case XDR_DECODE:
537 if (!GETLONG(xdrs, &temp))
538 return FALSE;
539 *ip = (int) temp;
540 return TRUE;
541
542 case XDR_FREE:
543 return TRUE;
544 }
545
546 return FALSE;
547}
548
549
550bool_t xdr_long(xdr_t* xdrs, SLONG* ip)

Callers

nothing calls this directly

Calls 2

PUTLONGFunction · 0.85
GETLONGFunction · 0.85

Tested by

no test coverage detected