Skip to content
Snippets Groups Projects
  • Alexander Turenko's avatar
    8e955847
    module api: add API_EXPORT to key_def functions · 8e955847
    Alexander Turenko authored
    It is the rule of thumb to use API_EXPORT with module API functions.
    
    To be honest, I don't see strict reason to use this macro except for
    unification with other module API functions.
    
    It adds 'extern', which is default for functions.
    
    It adds __attribute__((visibility("default"))), but symbols to be
    exported are listed in extra/exports or src/export.h (depending of
    tarantool version, see [1]).
    
    It adds __attribute__((nothrow)), which maybe allows a compiler to
    produce more optimized code and also catch an obvious problem and emit a
    warning. I don't know.
    
    So the reason for me is unification.
    
    Part of #5273
    
    [1]: 2.5.0-42-g03790ac55 ('cmake: remove dynamic-list linker option')
    [2]: 1.6.8-71-g55605c5c9 ('Add __attribute__((nothrow)) to API_EXPORT macro')
    module api: add API_EXPORT to key_def functions
    Alexander Turenko authored
    It is the rule of thumb to use API_EXPORT with module API functions.
    
    To be honest, I don't see strict reason to use this macro except for
    unification with other module API functions.
    
    It adds 'extern', which is default for functions.
    
    It adds __attribute__((visibility("default"))), but symbols to be
    exported are listed in extra/exports or src/export.h (depending of
    tarantool version, see [1]).
    
    It adds __attribute__((nothrow)), which maybe allows a compiler to
    produce more optimized code and also catch an obvious problem and emit a
    warning. I don't know.
    
    So the reason for me is unification.
    
    Part of #5273
    
    [1]: 2.5.0-42-g03790ac55 ('cmake: remove dynamic-list linker option')
    [2]: 1.6.8-71-g55605c5c9 ('Add __attribute__((nothrow)) to API_EXPORT macro')