deps/PicklingTools170Release/Xm/ptools170/pythoncext/pyocser.cc
inline void OCPyMarkProxy (PyObject *po, OCPyLoadContext_& lc)
{
  // If the last marker isn't set, then this isn't for proxying
  int_u4 marker = lc.last_marker;
  if (marker!=int_u4(-1)) {
    PyObjectInfo pyinfo;
    pyinfo.object = po;
    pyinfo.times = 1;
    pyinfo.marker = marker;
    lc.objectLookup[po] = pyinfo;

    PyObject* there = lc.markerLookup[marker];
    if (there != NULL) {
      throw runtime_error("Broke invariant about markers up by 1");
    }
    lc.markerLookup[marker] = po;
    // make sure we don't mark things unwarrantedly
    lc.last_marker = int_u4(-1);
  }
}
// When a heavyweight object (like List, Tuple, Dict, ODict, Numeric/Numpy
// array) deserializes, it's almost certainally a proxy.  If that's
// the case, we have to remember it in case it comes up again.  But
// we only remember it if it had a mark:  If the lc.last_marker is -1,
// then this is NOT a candidate for remembering.
When a heavyweight object (like List, Tuple, Dict, ODict, Numeric/Numpy
array) deserializes, it's almost certainally a proxy.  If that's
the case, we have to remember it in case it comes up again.  But
we only remember it if it had a mark:  If the lc.last_marker is -1,
then this is NOT a candidate for remembering.
When a heavyweight object ( like List Tuple Dict ODict Numeric / Numpy array ) deserializes it ' s almost certainally a proxy . If that ' s the case we have to remember it in case it comes up again . But we only remember it if it had a mark : If the lc . last_marker is - 1 then this is NOT a candidate for remembering .
inline void OCPyMarkProxy (PyObject *po, OCPyLoadContext_& lc)
{
  int_u4 marker = lc.last_marker;
  if (marker!=int_u4(-1)) {
    PyObjectInfo pyinfo;
    pyinfo.object = po;
    pyinfo.times = 1;
    pyinfo.marker = marker;
    lc.objectLookup[po] = pyinfo;
    PyObject* there = lc.markerLookup[marker];
    if (there != NULL) {
      throw runtime_error("Broke invariant about markers up by 1");
    }
    lc.markerLookup[marker] = po;
    lc.last_marker = int_u4(-1);
  }
}
inline void OCPyMarkProxy ( PyObject * po , OCPyLoadContext_ & lc ) { int_u4 marker = lc . last_marker ; if ( marker != int_u4 ( -1 ) ) { PyObjectInfo pyinfo ; pyinfo . object = po ; pyinfo . times = 1 ; pyinfo . marker = marker ; lc . objectLookup [ po ] = pyinfo ; PyObject * there = lc . markerLookup [ marker ] ; if ( there != NULL ) { throw runtime_error ( " " ) ; } lc . markerLookup [ marker ] = po ; lc . last_marker = int_u4 ( -1 ) ; } }
When a heavyweight object (like List, Tuple, Dict, ODict, Numeric/Numpy
array) deserializes, it's almost certainally a proxy.
When a heavyweight object ( like List Tuple Dict ODict Numeric / Numpy array ) deserializes it ' s almost certainally a proxy .
// If the last marker isn't set, then this isn't for proxying // make sure we don't mark things unwarrantedly