Make it harder to forget to redefine uthash_fatal

This commit is contained in:
Kovid Goyal 2021-05-06 12:59:06 +05:30
parent 33de0f821f
commit ec68739585
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
4 changed files with 14 additions and 11 deletions

View File

@ -13,7 +13,7 @@
#include "disk-cache.h"
#include "safe-wrappers.h"
#include "uthash.h"
#include "kitty-uthash.h"
#include "loop-utils.h"
#include "threading.h"
#include "cross-platform-random.h"
@ -25,8 +25,6 @@
#ifdef HAS_SENDFILE
#include <sys/sendfile.h>
#endif
#undef uthash_fatal
#define uthash_fatal(msg) fatal(msg)
typedef struct {

View File

@ -6,11 +6,7 @@
*/
#include "glyph-cache.h"
#include "uthash.h"
#undef uthash_fatal
#define uthash_fatal(msg) fatal(msg)
#include "kitty-uthash.h"
typedef struct SpritePosItem {

View File

@ -6,14 +6,12 @@
*/
#include "hyperlink.h"
#include "uthash.h"
#include "kitty-uthash.h"
#include <string.h>
#define MAX_KEY_LEN 2048
#define MAX_ID_LEN 256
#define MAX_ADDS_BEFORE_GC 256
#undef uthash_fatal
#define uthash_fatal(msg) fatal(msg)
typedef struct {
const char *key;

11
kitty/kitty-uthash.h Normal file
View File

@ -0,0 +1,11 @@
/*
* Copyright (C) 2021 Kovid Goyal <kovid at kovidgoyal.net>
*
* Distributed under terms of the GPL3 license.
*/
#pragma once
#include "data-types.h"
#define uthash_fatal(msg) fatal(msg)
#include "uthash.h"