diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2023-12-22 11:03:44 +0100 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2023-12-22 11:03:44 +0100 |
commit | c3599515c87faea1bab5a0c95a93f45090ea2561 (patch) | |
tree | 46dd8743e0520396c63cdc6f249741bedb4748df /quickjs.c | |
parent | 1692f2a7a34e9edc3fd4895a8316578851e3ef1c (diff) | |
download | quickjs-c3599515c87faea1bab5a0c95a93f45090ea2561.tar.gz quickjs-c3599515c87faea1bab5a0c95a93f45090ea2561.zip |
added container_of macro
Diffstat (limited to 'quickjs.c')
-rw-r--r-- | quickjs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4064,7 +4064,7 @@ void JS_FreeCString(JSContext *ctx, const char *ptr) if (!ptr) return; /* purposely removing constness */ - p = (JSString *)(void *)(ptr - offsetof(JSString, u)); + p = container_of(ptr, JSString, u); JS_FreeValue(ctx, JS_MKPTR(JS_TAG_STRING, p)); } |