From 5db3f14f85f8a2044712ffe25c2b25a751aa7c97 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 20 Oct 2016 16:44:20 +0200 Subject: [PATCH] eolian gen: use EWAPI for all generated variables --- src/bin/eolian/types.c | 4 +- src/lib/ecore_con/ecore_con.c | 8 +- src/lib/ecore_con/ecore_con_url_curl.c | 102 ++++++++++++------------ src/tests/eolian/data/class_simple_ref.c | 2 +- src/tests/eolian/data/class_simple_ref_eo.h | 4 +- src/tests/eolian/data/class_simple_ref_legacy.h | 4 +- src/tests/eolian/data/docs_ref.h | 2 +- src/tests/eolian/data/docs_ref_legacy.h | 2 +- 8 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c index 50c7d17..ccc9bc6 100644 --- a/src/bin/eolian/types.c +++ b/src/bin/eolian/types.c @@ -176,7 +176,7 @@ _var_generate(const Eolian_Variable *vr, Eina_Bool legacy) else { Eina_Stringshare *ct = eolian_type_c_type_get(vt); - eina_strbuf_append_printf(buf, "extern %s %s;", ct, fn); + eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn); eina_stringshare_del(ct); } free(fn); @@ -267,7 +267,7 @@ void eo_gen_types_source_gen(const char *eof, Eina_Strbuf *buf) const Eolian_Type *vt = eolian_variable_base_type_get(vr); Eina_Stringshare *ct = eolian_type_c_type_get(vt); - eina_strbuf_append_printf(buf, "%s %s = ", ct, fn); + eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn); eina_stringshare_del(ct); Eolian_Value val = eolian_expression_eval_type(vv, vt); diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index 6c788e0..270fd29 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -179,10 +179,10 @@ EAPI int ECORE_CON_EVENT_CLIENT_ERROR = 0; EAPI int ECORE_CON_EVENT_SERVER_ERROR = 0; EAPI int ECORE_CON_EVENT_PROXY_BIND = 0; -EAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_CONNECT = 0; -EAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = 0; -EAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST = 0; -EAPI Eina_Error EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = 0; +EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_CONNECT = 0; +EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = 0; +EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST = 0; +EWAPI Eina_Error EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = 0; static Eina_List *servers = NULL; static int _ecore_con_init_count = 0; diff --git a/src/lib/ecore_con/ecore_con_url_curl.c b/src/lib/ecore_con/ecore_con_url_curl.c index 1cb241b..c6ef501 100644 --- a/src/lib/ecore_con/ecore_con_url_curl.c +++ b/src/lib/ecore_con/ecore_con_url_curl.c @@ -26,57 +26,57 @@ Ecore_Con_Curl *_c = NULL; Eina_Bool _c_fail = EINA_FALSE; double _c_timeout = 0.0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_CONTENT_ENCODING = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_DOWNLOAD_RESUME = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_FUNCTION_ARGUMENT = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_CHUNK_FAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_CONV_FAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_CONV_REQD = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_FAILED_INIT = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_FILE_COULDNT_READ_FILE = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_FILESIZE_EXCEEDED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_FUNCTION_NOT_FOUND = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_GOT_NOTHING = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP2 = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP2_STREAM = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP_POST_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP_RETURNED_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_INTERFACE_FAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_LOGIN_DENIED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_NO_CONNECTION_AVAILABLE = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_NOT_BUILT_IN = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_OPERATION_TIMEDOUT = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_PARTIAL_FILE = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_PEER_FAILED_VERIFICATION = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_RANGE_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_READ_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_RECV_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_ACCESS_DENIED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_DISK_FULL = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_EXISTS = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_NOT_FOUND = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SEND_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SEND_FAIL_REWIND = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT_BADFILE = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CERTPROBLEM = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CIPHER = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CONNECT_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CRL_BADFILE = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_INITFAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_NOTFOUND = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_SETFAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_INVALIDCERTSTATUS = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ISSUER_ERROR = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_PINNEDPUBKEYNOTMATCH = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_SHUTDOWN_FAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_TOO_MANY_REDIRECTS = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_UNKNOWN_OPTION = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_UNSUPPORTED_PROTOCOL = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_UPLOAD_FAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_URL_MALFORMAT = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_USE_SSL_FAILED = 0; -EAPI Eina_Error EFL_NET_HTTP_ERROR_WRITE_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_CONTENT_ENCODING = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_DOWNLOAD_RESUME = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_BAD_FUNCTION_ARGUMENT = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_CHUNK_FAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_CONV_FAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_CONV_REQD = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_FAILED_INIT = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_FILE_COULDNT_READ_FILE = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_FILESIZE_EXCEEDED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_FUNCTION_NOT_FOUND = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_GOT_NOTHING = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP2 = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP2_STREAM = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP_POST_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_HTTP_RETURNED_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_INTERFACE_FAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_LOGIN_DENIED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_NO_CONNECTION_AVAILABLE = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_NOT_BUILT_IN = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_OPERATION_TIMEDOUT = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_PARTIAL_FILE = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_PEER_FAILED_VERIFICATION = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_RANGE_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_READ_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_RECV_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_ACCESS_DENIED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_DISK_FULL = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_EXISTS = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_REMOTE_FILE_NOT_FOUND = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SEND_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SEND_FAIL_REWIND = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CACERT_BADFILE = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CERTPROBLEM = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CIPHER = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CONNECT_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_CRL_BADFILE = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_INITFAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_NOTFOUND = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ENGINE_SETFAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_INVALIDCERTSTATUS = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_ISSUER_ERROR = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_PINNEDPUBKEYNOTMATCH = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_SSL_SHUTDOWN_FAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_TOO_MANY_REDIRECTS = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_UNKNOWN_OPTION = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_UNSUPPORTED_PROTOCOL = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_UPLOAD_FAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_URL_MALFORMAT = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_USE_SSL_FAILED = 0; +EWAPI Eina_Error EFL_NET_HTTP_ERROR_WRITE_ERROR = 0; Eina_Error _curlcode_to_eina_error(const CURLcode code) diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c index a8609e4..0a601ff 100644 --- a/src/tests/eolian/data/class_simple_ref.c +++ b/src/tests/eolian/data/class_simple_ref.c @@ -1,4 +1,4 @@ -float BAR = 10.300000f; +EWAPI float BAR = 10.300000f; Eina_Bool _class_simple_a_set(Eo *obj, Evas_Simple_Data *pd, int value); diff --git a/src/tests/eolian/data/class_simple_ref_eo.h b/src/tests/eolian/data/class_simple_ref_eo.h index 0d34ead..fea32db 100644 --- a/src/tests/eolian/data/class_simple_ref_eo.h +++ b/src/tests/eolian/data/class_simple_ref_eo.h @@ -23,13 +23,13 @@ typedef Eo Class_Simple; * * @ingroup Bar */ -extern float BAR; +EWAPI extern float BAR; /** in header but not in source * * @ingroup Baz */ -extern long BAZ; +EWAPI extern long BAZ; #endif diff --git a/src/tests/eolian/data/class_simple_ref_legacy.h b/src/tests/eolian/data/class_simple_ref_legacy.h index 30b4855..a4bd977 100644 --- a/src/tests/eolian/data/class_simple_ref_legacy.h +++ b/src/tests/eolian/data/class_simple_ref_legacy.h @@ -23,13 +23,13 @@ typedef Eo Class_Simple; * * @ingroup Bar */ -extern float BAR; +EWAPI extern float BAR; /** in header but not in source * * @ingroup Baz */ -extern long BAZ; +EWAPI extern long BAZ; #endif diff --git a/src/tests/eolian/data/docs_ref.h b/src/tests/eolian/data/docs_ref.h index ce1d4bb..c7fee1e 100644 --- a/src/tests/eolian/data/docs_ref.h +++ b/src/tests/eolian/data/docs_ref.h @@ -60,7 +60,7 @@ typedef Bar Alias; * * @ingroup pants */ -extern int PANTS; +EWAPI extern int PANTS; /** Opaque struct docs. See @ref Foo for another struct. * diff --git a/src/tests/eolian/data/docs_ref_legacy.h b/src/tests/eolian/data/docs_ref_legacy.h index 9c1160e..529326c 100644 --- a/src/tests/eolian/data/docs_ref_legacy.h +++ b/src/tests/eolian/data/docs_ref_legacy.h @@ -60,7 +60,7 @@ typedef Bar Alias; * * @ingroup pants */ -extern int PANTS; +EWAPI extern int PANTS; /** Opaque struct docs. See @ref Foo for another struct. * -- 2.7.4