Following some early work, expand some more macros to functions:
- pgp_new_keyinfo()
- new_pattern()
- rfc822_new_address()
void pgp_free_key (pgp_key_t *kpp);
-#define pgp_new_keyinfo() safe_calloc (sizeof *((pgp_key_t)0), 1)
+static inline pgp_key_t pgp_new_keyinfo(void)
+{
+ return safe_calloc (1, sizeof *((pgp_key_t)0));
+}
#endif /* CRYPT_BACKEND_CLASSIC_PGP */
(option (OPTLOCALES) ? 0 : (wc >= 0xa0)))
#endif
-#define new_pattern() safe_calloc(1, sizeof (pattern_t))
+static inline pattern_t *new_pattern (void)
+{
+ return safe_calloc (1, sizeof (pattern_t));
+}
int mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, HEADER *h, pattern_cache_t *);
pattern_t *mutt_pattern_comp (/* const */ char *s, int flags, BUFFER *err);
extern const char * const RFC822Errors[];
#define rfc822_error(x) RFC822Errors[x]
-#define rfc822_new_address() safe_calloc(1,sizeof(ADDRESS))
+
+static inline ADDRESS *rfc822_new_address (void)
+{
+ return safe_calloc (1, sizeof (ADDRESS));
+}
#endif /* rfc822_h */