We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b75d48 commit 4399a84Copy full SHA for 4399a84
include/mrc_ccontext.h
@@ -67,6 +67,7 @@ typedef struct mrc_ccontext {
67
} mrc_ccontext; /* compiler context */
68
69
mrc_ccontext *mrc_ccontext_new(mrb_state *mrb);
70
+void mrc_ccontext_cleanup_local_variables(mrc_ccontext *c);
71
const char *mrc_ccontext_filename(mrc_ccontext *c, const char *s);
72
void mrc_ccontext_free(mrc_ccontext *c);
73
src/ccontext.c
@@ -17,6 +17,18 @@ mrc_ccontext_new(mrb_state *mrb)
17
return c;
18
}
19
20
+
21
+MRC_API void
22
+mrc_ccontext_cleanup_local_variables(mrc_ccontext *c)
23
+{
24
+ if (c->syms) {
25
+ mrc_free(c->syms);
26
+ c->syms = NULL;
27
+ c->slen = 0;
28
+ }
29
+ c->keep_lv = FALSE;
30
+}
31
32
MRC_API const char *
33
mrc_ccontext_filename(mrc_ccontext *c, const char *s)
34
{
0 commit comments