ecoli_utils(3)

πŸ“¦ version 0.11.3, in epel 10

πŸ’… ecoli_utils β€” NAME ✨

okay so bestie, welcome to ecoli_utils(3) from the Library Functions Manual β€” this is the utils page, like, the grab-bag of miscellaneous helpers. Literally just:

  • Misc utils.

that's it, that's the vibe. πŸŽ€


🌸 SYNOPSIS

πŸ¦‹ Macros

Here's the whole squad, no cap:

#define EC_CAST(x, old_type, new_type)
#define EC_VA_END   ((void *)1)
#define EC_COUNT_OF(x)
#define EC_DEPRECATED(msg)
#define EC_DEPRECATED_MACRO_(x)
#define EC_DEPRECATED_MACRO(msg)

πŸ’– Detailed Description

Misc utils.

like… miscellaneous utilities. the little tools that don't need their own whole header, yk? 🫢


πŸ‘‘ Macro Definition Documentation

⭐ #define EC_CAST( x, old_type, new_type)

Value:

({                                                                                         \
    __typeof__(old_type) __x = (x);                                                    \
    (__typeof__(new_type))__x;                                                         \
})

Cast a variable into a type, ensuring its initial type first.

it's giving "trust but verify" β€” it pins down what type the thing was before yeeting it into the new type. highkey iconic. πŸ’…

Definition at line 17 of file utils.h.

⭐ #define EC_VA_END ((void *)1)

Mark the end of the arguments list in some functions.

it's the little "ok we're DONE here" sentinel for variadic argument lists 🚩✨

Definition at line 26 of file utils.h.

⭐ #define EC_COUNT_OF( x)

Value:

((sizeof(x) / sizeof(0 [x])) / ((size_t)(!(sizeof(x) % sizeof(0 [x])))))

Count number of elements in an array.

the way that this divides by a size_t cast of a logical NOT so you get a big ol' division-by-zero situation if the sizes don't line up 😭 it's a compile-time vibe check for your array, fr fr.

Definition at line 31 of file utils.h.

⭐ #define EC_DEPRECATED( msg)

Value:

__attribute__((deprecated(msg)))

Mark a function or type as deprecated.

so when someone uses the old thing, the compiler hits 'em with the msg. gentle parenting, compiler edition πŸŽ€

Definition at line 36 of file utils.h.

⭐ #define EC_DEPRECATED_MACRO_( x)

Value:

_Pragma(#x)

Emit a deprecation warning when a macro is expanded.

the underscore at the end? yeah that's the "internal helper" name tag, she's shy πŸ™ˆ

Definition at line 41 of file utils.h.

⭐ #define EC_DEPRECATED_MACRO( msg)

Value:

EC_DEPRECATED_MACRO_(GCC warning msg)

the outer wrapper that actually does the GCC warning thing through EC_DEPRECATED_MACRO_. macros all the way down bestie πŸŒ€

Definition at line 42 of file utils.h.

🌈 Author

Generated automatically by Doxygen for Libecoli from the source code.


and that's the whole page!! πŸ¦‹ no notes, ate and left no crumbs πŸ’œ

🫢 cute little sign-off: this gem is from Libecoli, Version 0.11.3, and it's the ecoli_utils(3) page β€” mwah, bye bestie! πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from