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

Method MptrArray

storage/connect/json.cpp:1978–1994  ·  view source on GitHub ↗

/ Replace all array offsets by pointers. */ /

Source from the content-addressed store, hash-verified

1976/* Replace all array offsets by pointers. */
1977/***********************************************************************/
1978PJAR SWAP::MptrArray(PJAR ojar) {
1979 PJAR jarp = (PJAR)MakePtr(Base, (size_t)ojar);
1980
1981 jarp = (PJAR)new((long long)jarp) JARRAY(0);
1982
1983 if (jarp->First) {
1984 jarp->Mvals = (PJVAL*)MakePtr(Base, (size_t)jarp->Mvals);
1985
1986 for (int i = 0; i < jarp->Size; i++)
1987 jarp->Mvals[i] = (PJVAL)MakePtr(Base, (size_t)jarp->Mvals[i]);
1988
1989 jarp->First = (PJVAL)MptrJValue(jarp->First);
1990 jarp->Last = (PJVAL)MakePtr(Base, (size_t)jarp->Last);
1991 } // endif First
1992
1993 return jarp;
1994} // end of MptrArray
1995
1996/***********************************************************************/
1997/* Replace all object offsets by pointers. */

Callers

nothing calls this directly

Calls 1

MakePtrFunction · 0.85

Tested by

no test coverage detected