efl/src/tests
Felipe Magno de Almeida 138e9e5294 eo: Rename EAPI macro to EO_API in Eo library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Reviewers: jptiz, lucas, vtorri, woohyun

Reviewed By: jptiz, lucas, vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12203
2020-12-09 13:52:25 -03:00
..
ecore singularize srand in eina_init - only once in one place 2020-10-03 20:46:50 +01:00
ecore_audio_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
ecore_con tests: ecore_con another cert update to extend the time its valid to 100 years 2020-05-11 17:05:44 +02:00
ecore_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
ecore_wl2 efl - build again - test suite break in using undefined ERR macro 2020-06-10 19:30:14 +01:00
ector cmake: remove! 2018-12-20 20:07:26 +01:00
edje tests: edje: check result of evas_engine_info_set() 2020-06-15 15:04:22 +02:00
edje_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
eet Evil : move mkstemp(s) and mkdtemp in eina_file directly 2020-10-08 11:58:11 +01:00
eet_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
eeze cmake: remove! 2018-12-20 20:07:26 +01:00
efl tests/efl: use alloca for composite model test future to avoid leak 2020-04-15 19:26:39 +02:00
efl_js bindings-cxx: fix missing @since tags at stable c#/cpp tests 2020-02-05 17:15:33 +01:00
efl_mono Fix typos 2020-06-25 09:03:05 +02:00
efreet Merge efreet_mime efreet_trash into efreet 2020-05-26 10:15:30 +02:00
eina eina: Rename EAPI macro to EINA_API in Eina library 2020-11-25 09:42:47 -03:00
eina_cxx bindings-cxx: fix missing @since tags at stable c#/cpp tests 2020-02-05 17:15:33 +01:00
eio tests: fix eio tests 2020-07-28 10:05:54 +02:00
eldbus eldbus_fake_server: fix string format usage 2020-09-01 14:12:31 +02:00
eldbus_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
elementary efl.ui.text : Fixing cursor movement using keyboard arrows/mouse click 2020-10-20 19:20:28 +09:00
elementary_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
elput here comes meson 2018-10-02 17:22:50 +02:00
elua elua test: fix undeclared variable 2020-10-09 23:26:00 +01:00
emile emile_test_base64: Fix memory leak 2019-05-02 13:48:22 +02:00
emotion meson: correctly use the correct dependency 2019-04-05 08:15:39 -04:00
eo eo: Rename EAPI macro to EO_API in Eo library 2020-12-09 13:52:25 -03:00
eo_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
eolian eolian: Add -e parameter to pass export symbol to eolian generator 2020-12-04 10:35:35 -03:00
eolian_cxx eo: Rename EAPI macro to EO_API in Eo library 2020-12-09 13:52:25 -03:00
eolian_js bindings-cxx: fix missing @since tags at stable c#/cpp tests 2020-02-05 17:15:33 +01:00
evas evas test - fix evas suite image data compare 2020-11-13 09:51:13 +00:00
evas_cxx cxx: Add license to CXX bindings. 2019-10-24 10:40:16 -03:00
evil Evil : move mkstemp(s) and mkdtemp in eina_file directly 2020-10-08 11:58:11 +01:00
.gitignore tests: add failsafe timeout for tests running in fork mode 2018-08-16 09:59:58 +02:00
efl_check.h efl_check.h: Replace stack allocated array by heap allocated 2020-06-23 17:21:22 +02:00
meson.build here comes meson 2018-10-02 17:22:50 +02:00
timeout.c tests: add failsafe timeout for tests running in fork mode 2018-08-16 09:59:58 +02:00