mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-07 17:43:53 +02:00
Fix error from asan when built with clang
This commit is contained in:
@@ -47,8 +47,8 @@ void log_error(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
#define fatal(...) { log_error(__VA_ARGS__); exit(EXIT_FAILURE); }
|
||||
static inline void cleanup_free(void *p) { free(*(void**)p); }
|
||||
#define FREE_AFTER_FUNCTION __attribute__((cleanup(cleanup_free)))
|
||||
static inline void cleanup_clear(void *p) { Py_XDECREF((PyObject *)p); }
|
||||
#define DECREF_AFTER_FUNCTION __attribute__((cleanup(cleanup_clear)))
|
||||
static inline void cleanup_decref(PyObject **p) { if(*p) { Py_DECREF(*p); *p = NULL;} }
|
||||
#define DECREF_AFTER_FUNCTION __attribute__((cleanup(cleanup_decref)))
|
||||
#define FREE_BUFFER_AFTER_FUNCTION __attribute__((cleanup(PyBuffer_Release)))
|
||||
|
||||
typedef unsigned long long id_type;
|
||||
|
||||
Reference in New Issue
Block a user