mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Move ARRAY_LENGTH to compiler_compat.h
This commit is contained in:
parent
0932f32291
commit
1e07b4031e
@ -451,6 +451,4 @@ STATIC int format_helper_exit_status(unsigned char child_state,
|
||||
|
||||
#endif /* defined(UTIL_PRIVATE) */
|
||||
|
||||
#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
|
||||
|
||||
#endif /* !defined(TOR_UTIL_H) */
|
||||
|
@ -253,4 +253,7 @@
|
||||
*/
|
||||
#define STRUCT_VAR_P(st, off) ((void*) ( ((char*)(st)) + (off) ) )
|
||||
|
||||
/** Macro: Yields the number of elements in array x. */
|
||||
#define ARRAY_LENGTH(x) ((sizeof(x)) / sizeof(x[0]))
|
||||
|
||||
#endif /* !defined(TOR_COMPAT_H) */
|
||||
|
Loading…
Reference in New Issue
Block a user