Stop stripping the size prefix off
This turns out to be super dangerous to do. A flatbuffer is aligned
assuming that the size is either there or not there. By removing it,
you break alignment.
This necesitates having 2 subclasses of Flatbuffer. A SizePrefixed
version and a non size prefixed version. That lets us distinguish for
methods which care.
Once all that's done, deal with the fallout through the code base,
including logfile_utils and the chaos that causes rippling out.
Change-Id: I91b7be355279a1c19e5c956c33359df01a17eacf
diff --git a/frc971/analysis/py_log_reader.cc b/frc971/analysis/py_log_reader.cc
index 08f3707..e8843a9 100644
--- a/frc971/analysis/py_log_reader.cc
+++ b/frc971/analysis/py_log_reader.cc
@@ -218,7 +218,8 @@
aos::CopyFlatBuffer(tools->reader->configuration());
return PyBytes_FromStringAndSize(
- reinterpret_cast<const char *>(buffer.data()), buffer.size());
+ reinterpret_cast<const char *>(buffer.span().data()),
+ buffer.span().size());
}
static PyMethodDef LogReader_methods[] = {