summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-27 16:35:04 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-27 16:35:04 +0200
commitb7a22e555f7d287edec0ae7c816de16ca74d2941 (patch)
tree88efaea460abd666ec1ecbbf54ad50c854919dea /src/blob.c
parent1074c4d32680e2a80dc2e2266f8499bbba6acbc0 (diff)
downloadapk-tools-b7a22e555f7d287edec0ae7c816de16ca74d2941.tar.gz
apk-tools-b7a22e555f7d287edec0ae7c816de16ca74d2941.tar.bz2
apk-tools-b7a22e555f7d287edec0ae7c816de16ca74d2941.tar.xz
apk-tools-b7a22e555f7d287edec0ae7c816de16ca74d2941.zip
solver, test: implements more provides things, add tests
ref #574
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/blob.c b/src/blob.c
index 0a7643d..a03c66a 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -609,7 +609,8 @@ static struct apk_hash_ops atom_ops = {
.compare = apk_blob_compare,
.delete_item = (apk_hash_delete_f) free,
};
-static apk_blob_t null_blob = {0,0};
+
+apk_blob_t apk_null_blob = {0,0};
void apk_atom_init(void)
{
@@ -622,7 +623,7 @@ apk_blob_t *apk_blob_atomize(apk_blob_t blob)
unsigned long hash = apk_hash_from_key(&atom_hash, blob);
if (blob.len < 0 || blob.ptr == NULL)
- return &null_blob;
+ return &apk_null_blob;
atom = (struct apk_blob_atom *) apk_hash_get_hashed(&atom_hash, blob, hash);
if (atom != NULL)
@@ -642,7 +643,7 @@ apk_blob_t *apk_blob_atomize_dup(apk_blob_t blob)
char *ptr;
if (blob.len < 0 || blob.ptr == NULL)
- return &null_blob;
+ return &apk_null_blob;
atom = (struct apk_blob_atom *) apk_hash_get_hashed(&atom_hash, blob, hash);
if (atom != NULL)
return &atom->blob;