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

Function xdr_enum

src/common/xdr.cpp:452–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450
451
452bool_t xdr_enum(xdr_t* xdrs, xdr_op* ip)
453{
454/**************************************
455 *
456 * x d r _ e n u m
457 *
458 **************************************
459 *
460 * Functional description
461 * Map from external to internal representation (or vice versa).
462 *
463 **************************************/
464 SLONG temp;
465
466 switch (xdrs->x_op)
467 {
468 case XDR_ENCODE:
469 temp = (SLONG) *ip;
470 return PUTLONG(xdrs, &temp);
471
472 case XDR_DECODE:
473 if (!GETLONG(xdrs, &temp))
474 return FALSE;
475 *ip = (xdr_op) temp;
476 return TRUE;
477
478 case XDR_FREE:
479 return TRUE;
480 }
481
482 return FALSE;
483}
484
485
486bool_t xdr_float(xdr_t* xdrs, float* ip)

Callers 1

xdr_protocolFunction · 0.85

Calls 2

PUTLONGFunction · 0.85
GETLONGFunction · 0.85

Tested by

no test coverage detected