MCPcopy Create free account
hub / github.com/MariaDB/server / MakeOff

Function MakeOff

storage/connect/plugutil.cpp:630–643  ·  view source on GitHub ↗

/ This routine makes an offset from a pointer new format. */ /

Source from the content-addressed store, hash-verified

628/* This routine makes an offset from a pointer new format. */
629/*************************************************************************/
630size_t MakeOff(void* memp, void* ptr)
631{
632 if (ptr) {
633#if defined(_DEBUG) || defined(DEVELOPMENT)
634 if (ptr <= memp) {
635 fprintf(stderr, "ptr %p <= memp %p", ptr, memp);
636 DoThrow(999);
637 } // endif ptr
638#endif // _DEBUG || DEVELOPMENT
639 return (size_t)(((char*)ptr) - ((char*)memp));
640 } else
641 return 0;
642
643} /* end of MakeOff */
644
645/*---------------------- End of PLUGUTIL program ------------------------*/

Callers 7

SwapJsonMethod · 0.85
MoffArrayMethod · 0.85
MoffObjectMethod · 0.85
MoffPairMethod · 0.85
MoffJValueMethod · 0.85
MoffValMethod · 0.85
MOFMethod · 0.85

Calls 1

DoThrowFunction · 0.85

Tested by

no test coverage detected