From 81618f95f9e94dfa81473ec27bf50ae7ccd974d7 Mon Sep 17 00:00:00 2001 From: Kyle Bayes Date: Wed, 4 Sep 2024 13:50:48 -0700 Subject: [PATCH] Update doc for mj_addFileVFS and mj_addBufferVFS as VFS is no longer memory limited. PiperOrigin-RevId: 671087960 Change-Id: I0b022554f4f47fe2e64c8201cd855b63d514c344 --- doc/APIreference/functions.rst | 4 ++-- doc/APIreference/functions_override.rst | 2 +- include/mujoco/mujoco.h | 4 ++-- introspect/functions.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/APIreference/functions.rst b/doc/APIreference/functions.rst index d304bb2a..d7d87848 100644 --- a/doc/APIreference/functions.rst +++ b/doc/APIreference/functions.rst @@ -1231,7 +1231,7 @@ mj_addFileVFS .. mujoco-include:: mj_addFileVFS -Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 1 when VFS is full, +Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 2 on name collision, or -1 when an internal error occurs. .. _mj_addBufferVFS: @@ -1241,7 +1241,7 @@ mj_addBufferVFS .. mujoco-include:: mj_addBufferVFS -Add file to VFS from buffer, return 0: success, 1: full, 2: repeated name, -1: failed to load. +Add file to VFS from buffer, return 0: success, 2: repeated name, -1: failed to load. .. _mj_deleteFileVFS: diff --git a/doc/APIreference/functions_override.rst b/doc/APIreference/functions_override.rst index 44318814..b8b0d0d0 100644 --- a/doc/APIreference/functions_override.rst +++ b/doc/APIreference/functions_override.rst @@ -20,7 +20,7 @@ Initialize an empty VFS, :ref:`mj_deleteVFS` must be called to deallocate the VF .. _mj_addFileVFS: -Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 1 when VFS is full, +Add file to VFS. The directory argument is optional and can be NULL or empty. Returns 0 on success, 2 on name collision, or -1 when an internal error occurs. .. _Parseandcompile: diff --git a/include/mujoco/mujoco.h b/include/mujoco/mujoco.h index 8c6ffa17..1e6b5431 100644 --- a/include/mujoco/mujoco.h +++ b/include/mujoco/mujoco.h @@ -77,10 +77,10 @@ MJAPI extern const char* mjRNDSTRING[mjNRNDFLAG][3]; // Initialize an empty VFS, mj_deleteVFS must be called to deallocate the VFS. MJAPI void mj_defaultVFS(mjVFS* vfs); -// Add file to VFS, return 0: success, 1: full, 2: repeated name, -1: failed to load. +// Add file to VFS, return 0: success, 2: repeated name, -1: failed to load. MJAPI int mj_addFileVFS(mjVFS* vfs, const char* directory, const char* filename); -// Add file to VFS from buffer, return 0: success, 1: full, 2: repeated name, -1: failed to load. +// Add file to VFS from buffer, return 0: success, 2: repeated name, -1: failed to load. MJAPI int mj_addBufferVFS(mjVFS* vfs, const char* name, const void* buffer, int nbuffer); // Delete file from VFS, return 0: success, -1: not found in VFS. diff --git a/introspect/functions.py b/introspect/functions.py index e6358821..838c1cff 100644 --- a/introspect/functions.py +++ b/introspect/functions.py @@ -64,7 +64,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([ ), ), ), - doc='Add file to VFS, return 0: success, 1: full, 2: repeated name, -1: failed to load.', # pylint: disable=line-too-long + doc='Add file to VFS, return 0: success, 2: repeated name, -1: failed to load.', # pylint: disable=line-too-long )), ('mj_addBufferVFS', FunctionDecl( @@ -94,7 +94,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([ type=ValueType(name='int'), ), ), - doc='Add file to VFS from buffer, return 0: success, 1: full, 2: repeated name, -1: failed to load.', # pylint: disable=line-too-long + doc='Add file to VFS from buffer, return 0: success, 2: repeated name, -1: failed to load.', # pylint: disable=line-too-long )), ('mj_deleteFileVFS', FunctionDecl(