mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-30 05:40:06 +00:00
Update jansson to 2.31.1
Remove unnecessary(?) patches PR: 246642 Submitted by: daniel.engberg.lists at pyret.net
This commit is contained in:
parent
b1e6a23531
commit
24f0b00ba5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=539540
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= jansson
|
||||
PORTVERSION= 2.12
|
||||
PORTVERSION= 2.13.1
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= http://www.digip.org/jansson/releases/
|
||||
|
||||
@ -12,10 +12,16 @@ COMMENT= C library for encoding, decoding, and manipulating JSON data
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
USES= cpe pathfix pkgconfig tar:bzip2 libtool
|
||||
TEST_DEPENDS= bash>=0:shells/bash
|
||||
|
||||
USES= cpe pathfix pkgconfig tar:bzip2 libtool shebangfix
|
||||
SHEBANG_FILES= scripts/clang-format scripts/clang-format-check
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
|
||||
CPE_VENDOR= jansson_project
|
||||
|
||||
INSTALL_TARGET= install-strip
|
||||
TEST_TARGET= check
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1543358593
|
||||
SHA256 (jansson-2.12.tar.bz2) = 645d72cc5dbebd4df608d33988e55aa42a7661039e19a379fcbe5c79d1aee1d2
|
||||
SIZE (jansson-2.12.tar.bz2) = 404669
|
||||
TIMESTAMP = 1590071298
|
||||
SHA256 (jansson-2.13.1.tar.bz2) = ee90a0f879d2b7b7159124ff22b937a2a9a8c36d3bb65d1da7dd3f04370a10bd
|
||||
SIZE (jansson-2.13.1.tar.bz2) = 430215
|
||||
|
@ -1,56 +0,0 @@
|
||||
--- src/hashtable.c.orig 2018-02-08 09:05:40 UTC
|
||||
+++ src/hashtable.c
|
||||
@@ -108,10 +108,10 @@ static int hashtable_do_del(hashtable_t *hashtable,
|
||||
{
|
||||
pair_t *pair;
|
||||
bucket_t *bucket;
|
||||
- size_t index;
|
||||
+ size_t idx;
|
||||
|
||||
- index = hash & hashmask(hashtable->order);
|
||||
- bucket = &hashtable->buckets[index];
|
||||
+ idx = hash & hashmask(hashtable->order);
|
||||
+ bucket = &hashtable->buckets[idx];
|
||||
|
||||
pair = hashtable_find_pair(hashtable, bucket, key, hash);
|
||||
if(!pair)
|
||||
@@ -154,7 +154,7 @@ static int hashtable_do_rehash(hashtable_t *hashtable)
|
||||
{
|
||||
list_t *list, *next;
|
||||
pair_t *pair;
|
||||
- size_t i, index, new_size, new_order;
|
||||
+ size_t i, idx, new_size, new_order;
|
||||
struct hashtable_bucket *new_buckets;
|
||||
|
||||
new_order = hashtable->order + 1;
|
||||
@@ -180,8 +180,8 @@ static int hashtable_do_rehash(hashtable_t *hashtable)
|
||||
for(; list != &hashtable->list; list = next) {
|
||||
next = list->next;
|
||||
pair = list_to_pair(list);
|
||||
- index = pair->hash % new_size;
|
||||
- insert_to_bucket(hashtable, &hashtable->buckets[index], &pair->list);
|
||||
+ idx = pair->hash % new_size;
|
||||
+ insert_to_bucket(hashtable, &hashtable->buckets[idx], &pair->list);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -220,7 +220,7 @@ int hashtable_set(hashtable_t *hashtable, const char *
|
||||
{
|
||||
pair_t *pair;
|
||||
bucket_t *bucket;
|
||||
- size_t hash, index;
|
||||
+ size_t hash, idx;
|
||||
|
||||
/* rehash if the load ratio exceeds 1 */
|
||||
if(hashtable->size >= hashsize(hashtable->order))
|
||||
@@ -228,8 +228,8 @@ int hashtable_set(hashtable_t *hashtable, const char *
|
||||
return -1;
|
||||
|
||||
hash = hash_str(key);
|
||||
- index = hash & hashmask(hashtable->order);
|
||||
- bucket = &hashtable->buckets[index];
|
||||
+ idx = hash & hashmask(hashtable->order);
|
||||
+ bucket = &hashtable->buckets[idx];
|
||||
pair = hashtable_find_pair(hashtable, bucket, key, hash);
|
||||
|
||||
if(pair)
|
@ -1,33 +0,0 @@
|
||||
--- src/jansson.h.orig 2018-11-26 08:10:21 UTC
|
||||
+++ src/jansson.h
|
||||
@@ -219,10 +219,10 @@ int json_object_iter_set_new(json_t *object, void *ite
|
||||
key = json_object_iter_key(n), \
|
||||
n = json_object_iter_next(object, json_object_key_to_iter(key)))
|
||||
|
||||
-#define json_array_foreach(array, index, value) \
|
||||
- for(index = 0; \
|
||||
- index < json_array_size(array) && (value = json_array_get(array, index)); \
|
||||
- index++)
|
||||
+#define json_array_foreach(array, idx, value) \
|
||||
+ for(idx = 0; \
|
||||
+ idx < json_array_size(array) && (value = json_array_get(array, idx)); \
|
||||
+ idx++)
|
||||
|
||||
static JSON_INLINE
|
||||
int json_object_set(json_t *object, const char *key, json_t *value)
|
||||
@@ -243,11 +243,11 @@ int json_object_iter_set(json_t *object, void *iter, j
|
||||
}
|
||||
|
||||
size_t json_array_size(const json_t *array);
|
||||
-json_t *json_array_get(const json_t *array, size_t index) JANSSON_ATTRS(warn_unused_result);
|
||||
-int json_array_set_new(json_t *array, size_t index, json_t *value);
|
||||
+json_t *json_array_get(const json_t *array, size_t idx) JANSSON_ATTRS(warn_unused_result);
|
||||
+int json_array_set_new(json_t *array, size_t idx, json_t *value);
|
||||
int json_array_append_new(json_t *array, json_t *value);
|
||||
-int json_array_insert_new(json_t *array, size_t index, json_t *value);
|
||||
-int json_array_remove(json_t *array, size_t index);
|
||||
+int json_array_insert_new(json_t *array, size_t idx, json_t *value);
|
||||
+int json_array_remove(json_t *array, size_t idx);
|
||||
int json_array_clear(json_t *array);
|
||||
int json_array_extend(json_t *array, json_t *other);
|
||||
|
@ -1,110 +0,0 @@
|
||||
--- src/value.c.orig 2018-11-26 08:10:21 UTC
|
||||
+++ src/value.c
|
||||
@@ -374,20 +374,20 @@ size_t json_array_size(const json_t *json)
|
||||
return json_to_array(json)->entries;
|
||||
}
|
||||
|
||||
-json_t *json_array_get(const json_t *json, size_t index)
|
||||
+json_t *json_array_get(const json_t *json, size_t idx)
|
||||
{
|
||||
json_array_t *array;
|
||||
if(!json_is_array(json))
|
||||
return NULL;
|
||||
array = json_to_array(json);
|
||||
|
||||
- if(index >= array->entries)
|
||||
+ if(idx >= array->entries)
|
||||
return NULL;
|
||||
|
||||
- return array->table[index];
|
||||
+ return array->table[idx];
|
||||
}
|
||||
|
||||
-int json_array_set_new(json_t *json, size_t index, json_t *value)
|
||||
+int json_array_set_new(json_t *json, size_t idx, json_t *value)
|
||||
{
|
||||
json_array_t *array;
|
||||
|
||||
@@ -401,14 +401,14 @@ int json_array_set_new(json_t *json, size_t index, jso
|
||||
}
|
||||
array = json_to_array(json);
|
||||
|
||||
- if(index >= array->entries)
|
||||
+ if(idx >= array->entries)
|
||||
{
|
||||
json_decref(value);
|
||||
return -1;
|
||||
}
|
||||
|
||||
- json_decref(array->table[index]);
|
||||
- array->table[index] = value;
|
||||
+ json_decref(array->table[idx]);
|
||||
+ array->table[idx] = value;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -480,7 +480,7 @@ int json_array_append_new(json_t *json, json_t *value)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int json_array_insert_new(json_t *json, size_t index, json_t *value)
|
||||
+int json_array_insert_new(json_t *json, size_t idx, json_t *value)
|
||||
{
|
||||
json_array_t *array;
|
||||
json_t **old_table;
|
||||
@@ -494,7 +494,7 @@ int json_array_insert_new(json_t *json, size_t index,
|
||||
}
|
||||
array = json_to_array(json);
|
||||
|
||||
- if(index > array->entries) {
|
||||
+ if(idx > array->entries) {
|
||||
json_decref(value);
|
||||
return -1;
|
||||
}
|
||||
@@ -506,21 +506,21 @@ int json_array_insert_new(json_t *json, size_t index,
|
||||
}
|
||||
|
||||
if(old_table != array->table) {
|
||||
- array_copy(array->table, 0, old_table, 0, index);
|
||||
- array_copy(array->table, index + 1, old_table, index,
|
||||
- array->entries - index);
|
||||
+ array_copy(array->table, 0, old_table, 0, idx);
|
||||
+ array_copy(array->table, idx + 1, old_table, idx,
|
||||
+ array->entries - idx);
|
||||
jsonp_free(old_table);
|
||||
}
|
||||
else
|
||||
- array_move(array, index + 1, index, array->entries - index);
|
||||
+ array_move(array, idx + 1, idx, array->entries - idx);
|
||||
|
||||
- array->table[index] = value;
|
||||
+ array->table[idx] = value;
|
||||
array->entries++;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int json_array_remove(json_t *json, size_t index)
|
||||
+int json_array_remove(json_t *json, size_t idx)
|
||||
{
|
||||
json_array_t *array;
|
||||
|
||||
@@ -528,14 +528,14 @@ int json_array_remove(json_t *json, size_t index)
|
||||
return -1;
|
||||
array = json_to_array(json);
|
||||
|
||||
- if(index >= array->entries)
|
||||
+ if(idx >= array->entries)
|
||||
return -1;
|
||||
|
||||
- json_decref(array->table[index]);
|
||||
+ json_decref(array->table[idx]);
|
||||
|
||||
/* If we're removing the last element, nothing has to be moved */
|
||||
- if(index < array->entries - 1)
|
||||
- array_move(array, index, index + 1, array->entries - index - 1);
|
||||
+ if(idx < array->entries - 1)
|
||||
+ array_move(array, idx, idx + 1, array->entries - idx - 1);
|
||||
|
||||
array->entries--;
|
||||
|
@ -3,5 +3,5 @@ include/jansson_config.h
|
||||
lib/libjansson.a
|
||||
lib/libjansson.so
|
||||
lib/libjansson.so.4
|
||||
lib/libjansson.so.4.11.1
|
||||
lib/libjansson.so.4.13.0
|
||||
libdata/pkgconfig/jansson.pc
|
||||
|
Loading…
Reference in New Issue
Block a user