Document engine plugins.

Rename `mjPLUGIN_DYNAMIC_LIBRARY_INIT` -> `mjPLUGIN_LIB_INIT`.

PiperOrigin-RevId: 521458377
Change-Id: I42aaec923e4f392899dfe53ab6ce1dddc75a83b3
This commit is contained in:
Yuval Tassa
2023-04-03 07:54:41 -07:00
committed by Copybara-Service
parent ebb150fa3d
commit 01b84089dd
10 changed files with 578 additions and 61 deletions
+2 -3
View File
@@ -67,8 +67,7 @@ typedef struct mjpPlugin_ mjpPlugin;
#if defined(__has_attribute)
#if __has_attribute(constructor)
#define mjPLUGIN_DYNAMIC_LIBRARY_INIT \
__attribute__((constructor)) static void _mjplugin_init(void)
#define mjPLUGIN_LIB_INIT __attribute__((constructor)) static void _mjplugin_init(void)
#endif // __has_attribute(constructor)
#elif defined(_MSC_VER)
@@ -86,7 +85,7 @@ typedef struct mjpPlugin_ mjpPlugin;
#endif // !defined(mjEXTERNC)
// NOLINTBEGIN(runtime/int)
#define mjPLUGIN_DYNAMIC_LIBRARY_INIT \
#define mjPLUGIN_LIB_INIT \
static void _mjplugin_dllmain(void); \
mjEXTERNC int __stdcall mjDLLMAIN(void* hinst, unsigned long reason, void* reserved) { \
if (reason == 1) { \