core: 添加转移 window metadata 数据的接口

This commit is contained in:
2026-04-07 05:47:47 +08:00
parent 5353e4c677
commit 0f8c35ae6c
3 changed files with 52 additions and 0 deletions

View File

@@ -18,6 +18,13 @@
*(void **)__ptr = nullptr; \
} while (0)
#define p_take(dst_p, src_p) \
do { \
p_delete(dst_p); \
*(dst_p) = *(src_p); \
*(src_p) = nullptr; \
} while (0)
static inline char *p_strdup(const char *text) {
char *r = strdup(text);
if (!r) abort();