Professional #include contents

前端 未结 6 805
南笙
南笙 2021-01-28 18:07

I need to create an API that will allow my customer\'s developers to use a proprietary C module that will be released as a library (think .lib or .so -

6条回答
  •  粉色の甜心
    2021-01-28 19:10

    Please pretty please make sure you don't (re)define symbols that might be defined anywhere else. I don't mean just the standard names, please prefix all symbols declared/defined in public headers with a specific string and avoid any name that anybody else might have ever though about using.

    I say this after seeing too much craziness like this in "professional" publicly available headers:

    typedef unsigned short uchar;
    

提交回复
热议问题