From cf8d9e12f5222e5e6173a82f58c14b7eb6842c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 18 Aug 2010 18:53:44 +0300 Subject: blob: definite null blob inline Should be faster in most cases to write two null words than to copy them around. --- blob.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'blob.h') diff --git a/blob.h b/blob.h index dba2f97..cfd8cd5 100644 --- a/blob.h +++ b/blob.h @@ -28,8 +28,7 @@ typedef struct blob { #define BLOB_STRLEN(str) (blob_t){(str), strlen(str)} #define BLOB_STR_INIT(str) {(str), sizeof(str)-1} #define BLOB_STR(str) (blob_t) BLOB_STR_INIT(str) - -extern const blob_t BLOB_NULL; +#define BLOB_NULL (blob_t){NULL, 0} static inline int blob_is_null(blob_t b) { -- cgit v1.2.3