TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C++ Coding Standard

Rule:  POR#038

Synopsis:Make sure that the sizes and types of functions are well-defined if exported to other languages
Severity Level:4


When exporting functions for use from other languages, make sure that the sizes of arguments to these functions and the type of the return value are well-defined. Use the types of known size that are provided by your language implementation ( e.g. uint32_t in C/C++11) or make use of local typedefs that are available in your environment. Do not use types such as int, short or long directly because these might have another size for other languages. For instance a long is 4 bytes in C++ on most platforms and 8 bytes in C#.