Naming conventions in UNIX C functions (_t and _st) -


i notice there function return types named *****_t or ******_st. "_st" , "_t" mean?

posix reserves names ending _t types. although quite common see code invents own type names ending _t, doing dangerous - can run posix systems define (different) type same name.


in libmemcached source, looks _st suffix used indicate structure type:

types.h:typedef struct memcached_st memcached_st; types.h:typedef struct memcached_stat_st memcached_stat_st; types.h:typedef struct memcached_analysis_st memcached_analysis_st; types.h:typedef struct memcached_result_st memcached_result_st; types.h:// of flavors of memcache_server_st types.h:typedef struct memcached_server_st memcached_server_st; types.h:typedef const struct memcached_server_st *memcached_server_instance_st; types.h:typedef struct memcached_server_st *memcached_server_list_st; 

i didn't find single instance of function ending _st (but may not have looked hard enough).


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -