deps/PicklingTools170Release/Xm/ptools170/pythoncext/pyocser.cc
size_t OCPyBytesToSerializeSeq (PyObject *po, OCPyDumpContext_& dc)
{
  size_t bytes = 0;
  if (OCPyBytesToSerializeProxy(po, dc, &bytes)) return bytes;

  // A 'n'/'N' marker, 'Z' starts, plus len
  const size_t len = PySequence_Size(po);
  bytes += 1+1+((len<=0xFFFFFFFF) ? sizeof(int_u4) : sizeof(int_u8));

  for (size_t ii=0; ii<len; ii++) {
    PyObject *pyitem = PySequence_GetItem(po, ii);
    bytes += OCPyBytesToSerialize(pyitem, dc);
  }

  return bytes;
}
// Generic sequence: this works for Lists and other Python sequences
// such as tuples, but we have to mark what kind of sequence it is:
// by default it becomes a List (but it can be a tuple with 'u''U')
Generic sequence: this works for Lists and other Python sequences
such as tuples, but we have to mark what kind of sequence it is:
by default it becomes a List (but it can be a tuple with 'u''U')
Generic sequence : this works for Lists and other Python sequences such as tuples but we have to mark what kind of sequence it is : by default it becomes a List ( but it can be a tuple with ' u ' ' U ' )
size_t OCPyBytesToSerializeSeq (PyObject *po, OCPyDumpContext_& dc)
{
  size_t bytes = 0;
  if (OCPyBytesToSerializeProxy(po, dc, &bytes)) return bytes;
  const size_t len = PySequence_Size(po);
  bytes += 1+1+((len<=0xFFFFFFFF) ? sizeof(int_u4) : sizeof(int_u8));
  for (size_t ii=0; ii<len; ii++) {
    PyObject *pyitem = PySequence_GetItem(po, ii);
    bytes += OCPyBytesToSerialize(pyitem, dc);
  }
  return bytes;
}
size_t OCPyBytesToSerializeSeq ( PyObject * po , OCPyDumpContext_ & dc ) { size_t bytes = 0 ; if ( OCPyBytesToSerializeProxy ( po , dc , & bytes ) ) return bytes ; const size_t len = PySequence_Size ( po ) ; bytes += 1 + 1 + ( ( len <= 0xFFFFFFFF ) ? sizeof ( int_u4 ) : sizeof ( int_u8 ) ) ; for ( size_t ii = 0 ; ii < len ; ii ++ ) { PyObject * pyitem = PySequence_GetItem ( po , ii ) ; bytes += OCPyBytesToSerialize ( pyitem , dc ) ; } return bytes ; }
Generic sequence: this works for Lists and other Python sequences
such as tuples, but we have to mark what kind of sequence it is:
by default it becomes a List (but it can be a tuple with 'u''U')
Generic sequence : this works for Lists and other Python sequences such as tuples but we have to mark what kind of sequence it is : by default it becomes a List ( but it can be a tuple with ' u ' ' U ' )
// A 'n'/'N' marker, 'Z' starts, plus len