Add ODesc::Size() that returns size_t, deprecate ODesc::Len()

This commit is contained in:
Tim Wojtulewicz 2025-07-24 18:29:08 -07:00
parent 6e2a18ce4f
commit 7a5209855f
12 changed files with 47 additions and 45 deletions

View file

@ -397,7 +397,7 @@ static void BuildJSON(json::detail::NullDoubleWriter& writer, Val* val, bool onl
ODesc d;
d.SetStyle(RAW_STYLE);
val->Describe(&d);
writer.String(reinterpret_cast<const char*>(d.Bytes()), d.Len());
writer.String(reinterpret_cast<const char*>(d.Bytes()), d.Size());
break;
}
@ -408,7 +408,7 @@ static void BuildJSON(json::detail::NullDoubleWriter& writer, Val* val, bool onl
ODesc d;
d.SetStyle(RAW_STYLE);
val->Describe(&d);
writer.String(reinterpret_cast<const char*>(d.Bytes()), d.Len());
writer.String(reinterpret_cast<const char*>(d.Bytes()), d.Size());
}
break;
}
@ -420,7 +420,7 @@ static void BuildJSON(json::detail::NullDoubleWriter& writer, Val* val, bool onl
ODesc d;
d.SetStyle(RAW_STYLE);
val->Describe(&d);
std::string desc(reinterpret_cast<const char*>(d.Bytes()), d.Len());
std::string desc(reinterpret_cast<const char*>(d.Bytes()), d.Size());
// None of our function types should have surrounding
// whitespace, but ODesc might produce it due to its