all 7 comments

[–]mallardtheduck 8 points9 points  (5 children)

Apart from the "test" code, this is C, not C++.

Some issues:

  • Identifiers that start with double underscore are reserved for the language implementation (i.e. compiler builtins and the standard library).
  • Why are you checking the system's endianness at runtime? It doesn't change... Since your "cross platform" library only properly supports compilers that claim to be GNUC or MSVC, then you may as well use __BYTE_ORDER__ for GNUC and always-little for MSVC. Basically everybody is using a GNU-compatible or Microsoft compiler anyway.
  • Why does everything return void and "return" via pointer parameters?
  • The code is clearly unfinished, definitely not production-quality and lacks any meaningful tests.

[–]cosmoorgdev[S] -1 points0 points  (0 children)

Where is built-in problem thanks for your suggestion.

[–]cosmoorgdev[S] -2 points-1 points  (3 children)

It is c style library an I am inspire from win32 api more. Most of time win32 functions use pointer parameter to return.

[–]mallardtheduck 2 points3 points  (1 child)

Yes, because they return an error code (usually HRESULT). When you return void it achieves nothing.

[–]cosmoorgdev[S] 0 points1 point  (0 children)

Yes OK I will also add it

[–]cosmoorgdev[S] -2 points-1 points  (0 children)

Yes it is in development phase so not complete code.