LibSWD icon indicating copy to clipboard operation
LibSWD copied to clipboard

Fixing several issues

Open ViaExplore opened this issue 8 years ago • 2 comments

Hi @cederom ,

here are the separated commits for reported issues. The last commit is about to discuss a little bit. See comments in code at last commit :)

Regards, Tomas Kamenicky

ViaExplore avatar Jun 16 '17 10:06 ViaExplore

Yea, this is it! Each functional update in a separate commit :-)

Why do you define libswd_log_flush() in two places? What is the reason to use __attribute__ ((weak))?

cederom avatar Jun 16 '17 11:06 cederom

Why do you define libswd_log_flush() in two places?

  • otherwise compilation will fail on libswd_log_flush not declared. Do not ask me why is this :D BTW libswd_log is also twice, and it wasnt me ;-)

What is the reason to use attribute ((weak))?

  • the reason is very simple, if you not define any your custom application function, than the weak one will still work for you directly form library. I think that this is the correct way of doing application interfaces. Or am I wrong?

ViaExplore avatar Jun 16 '17 11:06 ViaExplore