mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-31 06:18:17 +00:00
Fix error from asan when built with clang
This commit is contained in:
parent
1347d1ad47
commit
9af4d5e0fc
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue