Change mj_encode return type to 64-bit (mjtSize)

This supports encoding files larger than 2GB.

PiperOrigin-RevId: 939828697
Change-Id: If60d36c61475ced20b4eb58408ffb37e25bf3db7
This commit is contained in:
Sam Haves
2026-06-29 07:41:23 -07:00
committed by Copybara-Service
parent 1e04c568e8
commit d83ef0b6b9
11 changed files with 32 additions and 27 deletions
+3 -3
View File
@@ -147,9 +147,9 @@ MJAPI mjSpec* mj_parse(const char* filename, const char* content_type,
// Encode spec/model to a file using a registered encoder.
// Returns the number of bytes written on success, -1 on failure.
// Nullable: m, vfs, error
MJAPI int mj_encode(const mjSpec* s, const mjModel* m, const char* filename,
const char* content_type, const mjVFS* vfs, char* error,
int error_sz);
MJAPI mjtSize mj_encode(const mjSpec* s, const mjModel* m, const char* filename,
const char* content_type, const mjVFS* vfs, char* error,
int error_sz);
// Compile spec to model.
// Nullable: vfs