builder: Add builder_cache_checksum_compat_strv

This lets us add strv:s without invalidating old caches
if the empty strv means same as before
This commit is contained in:
Alexander Larsson committed 2017-02-22 09:42:13 +01:00
1 parent 359d4fa96b
commit 67dc4a153f
2 files changed
+15

No files matched your search

+13
View File
@@ -1088,6 +1088,19 @@ builder_cache_checksum_str (BuilderCache *self,
g_checksum_update (self->checksum, (const guchar *) "\1", 1);
}
/* Only add to cache if non-empty. This means we can add
these things compatibly without invalidating the cache.
This is useful if empty means no change from what was
before */
void
builder_cache_checksum_compat_strv (BuilderCache *self,
char **strv)
{
if (strv != NULL && strv[0] != NULL)
builder_cache_checksum_strv (self, strv);
}
void
builder_cache_checksum_strv (BuilderCache *self,
char **strv)
+2
View File
@@ -65,6 +65,8 @@ void builder_cache_checksum_str (BuilderCache *self,
const char *str);
void builder_cache_checksum_strv (BuilderCache *self,
char **strv);
void builder_cache_checksum_compat_strv (BuilderCache *self,
char **strv);
void builder_cache_checksum_boolean (BuilderCache *self,
gboolean val);
void builder_cache_checksum_uint32 (BuilderCache *self,