diff options
| author | 2025-06-16 11:57:53 +0200 | |
|---|---|---|
| committer | 2025-06-16 11:57:53 +0200 | |
| commit | c2021ab74da2048fc330c8185d98f2c9331c8149 (patch) | |
| tree | 989aae2f3ae662ed7fbd4332075ab5360128e957 /pez.c | |
| parent | 2ae76e402eac4b451ce58ce41352def8ff2dffb9 (diff) | |
+ pez_setglobal
Diffstat (limited to 'pez.c')
| -rw-r--r-- | pez.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -4540,6 +4540,15 @@ pez_pushuserobj(PezContext *cx, const PezUserType *typeid, void *data) } bool +pez_setglobal(PezContext *cx, const char *name) +{ + Val k, v; + TRY(box_str(cx, &k, name, strlen(name))); + v = pop(cx); + return putglobal(cx, k, v); +} + +bool pez_isvoid(PezContext *cx, int idx) { return isvoid(*iget(cx, idx)); |