Static, const, extern C changes

Please, merge this pull request.
Thank you in advance!