aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface
diff options
context:
space:
mode:
Diffstat (limited to 'lib/erl_interface')
-rw-r--r--lib/erl_interface/include/ei.h2
-rw-r--r--lib/erl_interface/src/decode/decode_fun.c12
-rw-r--r--lib/erl_interface/src/encode/encode_fun.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h
index 591367dc95..a860df3f77 100644
--- a/lib/erl_interface/include/ei.h
+++ b/lib/erl_interface/include/ei.h
@@ -287,7 +287,7 @@ typedef struct {
struct {
char* func;
int func_allocated;
- } export;
+ } exprt;
} u;
} erlang_fun;
diff --git a/lib/erl_interface/src/decode/decode_fun.c b/lib/erl_interface/src/decode/decode_fun.c
index 32a950433e..3a7a2b01c1 100644
--- a/lib/erl_interface/src/decode/decode_fun.c
+++ b/lib/erl_interface/src/decode/decode_fun.c
@@ -153,8 +153,8 @@ int ei_decode_fun(const char *buf, int *index, erlang_fun *p)
/* try use module buffer for function name */
used = strlen(p->module) + 1;
p_func = p->module + used;
- p->u.export.func = p_func;
- p->u.export.func_allocated = 0;
+ p->u.exprt.func = p_func;
+ p->u.exprt.func_allocated = 0;
}
else {
used = 0;
@@ -165,8 +165,8 @@ int ei_decode_fun(const char *buf, int *index, erlang_fun *p)
if (!used)
return -1;
p_func = malloc(MAXATOMLEN_UTF8);
- p->u.export.func = p_func;
- p->u.export.func_allocated = 1;
+ p->u.exprt.func = p_func;
+ p->u.exprt.func_allocated = 1;
used = 0;
}
if (ei_decode_long(s, &ix, p_arity) < 0)
@@ -186,8 +186,8 @@ void free_fun(erlang_fun* f)
ei_free(f->u.closure.free_vars);
break;
case EI_FUN_EXPORT:
- if (f->u.export.func_allocated)
- ei_free(f->u.export.func);
+ if (f->u.exprt.func_allocated)
+ ei_free(f->u.exprt.func);
break;
}
}
diff --git a/lib/erl_interface/src/encode/encode_fun.c b/lib/erl_interface/src/encode/encode_fun.c
index 38ba7c5b30..e29424f9f4 100644
--- a/lib/erl_interface/src/encode/encode_fun.c
+++ b/lib/erl_interface/src/encode/encode_fun.c
@@ -87,7 +87,7 @@ int ei_encode_fun(char *buf, int *index, const erlang_fun *p)
ix++;
if (ei_encode_atom_as(buf, &ix, p->module, ERLANG_UTF8, ERLANG_UTF8) < 0)
return -1;
- if (ei_encode_atom_as(buf, &ix, p->u.export.func, ERLANG_UTF8, ERLANG_UTF8) < 0)
+ if (ei_encode_atom_as(buf, &ix, p->u.exprt.func, ERLANG_UTF8, ERLANG_UTF8) < 0)
return -1;
if (ei_encode_long(buf, &ix, p->arity) < 0)
return -1;