Closed rdbo closed 1 year ago
There types that are kind of hard to understand, like lm_bstring_t
. These are simply unnecessary.
lm_bstring_t
-> lm_byte_t *
(makes more sense)
lm_voidptr_t
-> lm_void_t *
Maybe the string and character should be simplified as well. After all, tchar_t
and tstring_t
are kind of weird:
#if LM_CHARSET == LM_CHARSET_UC
typedef lm_wchar_t lm_char_t;
#else
typedef lm_cchar_t lm_char_t;
#endif
typedef lm_char_t *lm_string_t;
Unified types: d730d53268c661503c3ad0b68f12ab7d1f18d1ba
Changed string types: 3b9801e6489cd5aca7e0599fcd24975f3d2502d8 and 4909cd0bc39be92c5af1c0fe1112b4c6fec74525
Some types could be unified across platforms. For example, the
lm_pid_t
for Windows is aDWORD
(a.k.aunsigned int
). On *nix, it is apid_t
(a.k.aint
). They could be unified into a single type, like:No need to have them differ on both platforms when they can be the same. This would also be easier for porting to other languages, since libmem would guarantee that type works everywhere.