From 7e064720c1363ee4ca4209d7c8b0f33a90182ce7 Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 5 Apr 2019 18:26:45 +0200 Subject: erl_interface: Deprecate ei_encode_term and ei_decode_term as they use ETERM which is part of legacy erl_interface. --- lib/erl_interface/doc/src/ei.xml | 10 ++++++++-- lib/erl_interface/include/ei.h | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'lib/erl_interface') diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index f081ca926a..26fe6f8831 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -349,8 +349,10 @@ typedef enum { t is actually an ETERM** (see erl_eterm). The term is later to be deallocated.

-

Notice that this function is located in the Erl_Interface - library.

+

This function is deprecated as of OTP 22 and will be removed in + OTP 23 together with the old legacy erl_interface library (functions + with prefix erl_).

+
@@ -656,6 +658,10 @@ ei_x_encode_string(&x, "Banana"); erl_interface. Parameter t is actually an ETERM pointer. This function does not free the ETERM.

+

These functions are deprecated as of OTP 22 and will be removed in + OTP 23 together with the old legacy erl_interface library + (functions with prefix erl_).

+
diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h index aa2a49098f..ad0e30b101 100644 --- a/lib/erl_interface/include/ei.h +++ b/lib/erl_interface/include/ei.h @@ -524,8 +524,8 @@ int ei_encode_port(char *buf, int *index, const erlang_port *p); int ei_x_encode_port(ei_x_buff* x, const erlang_port *p); int ei_encode_ref(char *buf, int *index, const erlang_ref *p); int ei_x_encode_ref(ei_x_buff* x, const erlang_ref *p); -int ei_encode_term(char *buf, int *index, void *t); /* ETERM* actually */ -int ei_x_encode_term(ei_x_buff* x, void* t); +int ei_encode_term(char *buf, int *index, void *t) EI_DEPRECATED_ATTR; +int ei_x_encode_term(ei_x_buff* x, void* t) EI_DEPRECATED_ATTR; int ei_encode_trace(char *buf, int *index, const erlang_trace *p); int ei_x_encode_trace(ei_x_buff* x, const erlang_trace *p); int ei_encode_tuple_header(char *buf, int *index, int arity); @@ -572,7 +572,7 @@ void free_fun(erlang_fun* f); int ei_decode_pid(const char *buf, int *index, erlang_pid *p); int ei_decode_port(const char *buf, int *index, erlang_port *p); int ei_decode_ref(const char *buf, int *index, erlang_ref *p); -int ei_decode_term(const char *buf, int *index, void *t); /* ETERM** actually */ +int ei_decode_term(const char *buf, int *index, void *t) EI_DEPRECATED_ATTR; int ei_decode_trace(const char *buf, int *index, erlang_trace *p); int ei_decode_tuple_header(const char *buf, int *index, int *arity); int ei_decode_list_header(const char *buf, int *index, int *arity); -- cgit v1.2.3