Skip to content

Commit

Permalink
Fix x86 Windows build: add APU_DECLARE() apr_jose*() and apr_json_*()
Browse files Browse the repository at this point in the history
function implementation.

git-svn-id: https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x@1920659 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Ivan Zhakov committed Sep 14, 2024
1 parent 052a30b commit 60daebf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion jose/apr_jose_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ apr_status_t apr_jose_decode_json(apr_jose_t **jose, const char *typ,
return status;
}

apr_status_t apr_jose_decode(apr_jose_t **jose, const char *typ,
APU_DECLARE(apr_status_t) apr_jose_decode(apr_jose_t **jose, const char *typ,
apr_bucket_brigade *brigade, apr_jose_cb_t *cb, int level, int flags,
apr_pool_t *pool)
{
Expand Down
36 changes: 18 additions & 18 deletions json/apr_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
APR_RING_CHECK_CONSISTENCY(&(o)->list, apr_json_value_t, link); \
} while (0)

apr_json_value_t *apr_json_value_create(apr_pool_t *pool)
APU_DECLARE(apr_json_value_t *) apr_json_value_create(apr_pool_t *pool)
{
return apr_pcalloc(pool, sizeof(apr_json_value_t));
}

apr_json_value_t *apr_json_object_create(apr_pool_t *pool)
APU_DECLARE(apr_json_value_t *) apr_json_object_create(apr_pool_t *pool)
{
apr_json_object_t *object;

Expand All @@ -50,7 +50,7 @@ apr_json_value_t *apr_json_object_create(apr_pool_t *pool)
return json;
}

apr_json_value_t *apr_json_string_create(apr_pool_t *pool, const char *val,
APU_DECLARE(apr_json_value_t *) apr_json_string_create(apr_pool_t *pool, const char *val,
apr_ssize_t len) {
apr_json_value_t *json = apr_json_value_create(pool);

Expand All @@ -67,7 +67,7 @@ apr_json_value_t *apr_json_string_create(apr_pool_t *pool, const char *val,
return json;
}

apr_json_value_t *apr_json_array_create(apr_pool_t *pool, int nelts)
APU_DECLARE(apr_json_value_t *) apr_json_array_create(apr_pool_t *pool, int nelts)
{
apr_json_value_t *json = apr_json_value_create(pool);

Expand All @@ -82,7 +82,7 @@ apr_json_value_t *apr_json_array_create(apr_pool_t *pool, int nelts)
return json;
}

apr_json_value_t *apr_json_long_create(apr_pool_t *pool, apr_int64_t lnumber)
APU_DECLARE(apr_json_value_t *) apr_json_long_create(apr_pool_t *pool, apr_int64_t lnumber)
{
apr_json_value_t *json = apr_json_value_create(pool);

Expand All @@ -94,7 +94,7 @@ apr_json_value_t *apr_json_long_create(apr_pool_t *pool, apr_int64_t lnumber)
return json;
}

apr_json_value_t *apr_json_double_create(apr_pool_t *pool, double dnumber)
APU_DECLARE(apr_json_value_t *) apr_json_double_create(apr_pool_t *pool, double dnumber)
{
apr_json_value_t *json = apr_json_value_create(pool);

Expand All @@ -106,7 +106,7 @@ apr_json_value_t *apr_json_double_create(apr_pool_t *pool, double dnumber)
return json;
}

apr_json_value_t *apr_json_boolean_create(apr_pool_t *pool, int boolean)
APU_DECLARE(apr_json_value_t *) apr_json_boolean_create(apr_pool_t *pool, int boolean)
{
apr_json_value_t *json = apr_json_value_create(pool);

Expand All @@ -118,7 +118,7 @@ apr_json_value_t *apr_json_boolean_create(apr_pool_t *pool, int boolean)
return json;
}

apr_json_value_t *apr_json_null_create(apr_pool_t *pool)
APU_DECLARE(apr_json_value_t *) apr_json_null_create(apr_pool_t *pool)
{
apr_json_value_t *json = apr_json_value_create(pool);

Expand All @@ -129,7 +129,7 @@ apr_json_value_t *apr_json_null_create(apr_pool_t *pool)
return json;
}

apr_status_t apr_json_object_set(apr_json_value_t *object,
APU_DECLARE(apr_status_t) apr_json_object_set(apr_json_value_t *object,
const char *key, apr_ssize_t klen, apr_json_value_t *val,
apr_pool_t *pool)
{
Expand Down Expand Up @@ -170,7 +170,7 @@ apr_status_t apr_json_object_set(apr_json_value_t *object,
return APR_SUCCESS;
}

apr_status_t apr_json_object_set_ex(apr_json_value_t *object,
APU_DECLARE(apr_status_t) apr_json_object_set_ex(apr_json_value_t *object,
apr_json_value_t *key, apr_json_value_t *val,
apr_pool_t *pool)
{
Expand Down Expand Up @@ -209,7 +209,7 @@ apr_status_t apr_json_object_set_ex(apr_json_value_t *object,
return APR_SUCCESS;
}

apr_json_kv_t *apr_json_object_get(apr_json_value_t *object, const char *key, apr_ssize_t klen)
APU_DECLARE(apr_json_kv_t *) apr_json_object_get(apr_json_value_t *object, const char *key, apr_ssize_t klen)
{
if (object->type != APR_JSON_OBJECT) {
return NULL;
Expand All @@ -218,7 +218,7 @@ apr_json_kv_t *apr_json_object_get(apr_json_value_t *object, const char *key, ap
return apr_hash_get(object->value.object->hash, key, klen);
}

apr_json_kv_t *apr_json_object_first(apr_json_value_t *obj)
APU_DECLARE(apr_json_kv_t *) apr_json_object_first(apr_json_value_t *obj)
{
apr_json_kv_t *kv;

Expand All @@ -236,7 +236,7 @@ apr_json_kv_t *apr_json_object_first(apr_json_value_t *obj)
}
}

apr_json_kv_t *apr_json_object_next(apr_json_value_t *obj, apr_json_kv_t *kv)
APU_DECLARE(apr_json_kv_t *) apr_json_object_next(apr_json_value_t *obj, apr_json_kv_t *kv)
{
apr_json_kv_t *next;

Expand All @@ -254,7 +254,7 @@ apr_json_kv_t *apr_json_object_next(apr_json_value_t *obj, apr_json_kv_t *kv)
}
}

apr_status_t apr_json_array_add(apr_json_value_t *arr,
APU_DECLARE(apr_status_t) apr_json_array_add(apr_json_value_t *arr,
apr_json_value_t *val)
{
apr_array_header_t *array;
Expand All @@ -274,7 +274,7 @@ apr_status_t apr_json_array_add(apr_json_value_t *arr,
return APR_SUCCESS;
}

apr_json_value_t *apr_json_array_get(apr_json_value_t *arr, int index)
APU_DECLARE(apr_json_value_t *) apr_json_array_get(apr_json_value_t *arr, int index)
{
if (arr->type != APR_JSON_ARRAY) {
return NULL;
Expand All @@ -283,7 +283,7 @@ apr_json_value_t *apr_json_array_get(apr_json_value_t *arr, int index)
return APR_ARRAY_IDX(arr->value.array->array, index, apr_json_value_t *);
}

apr_json_value_t *apr_json_array_first(const apr_json_value_t *arr)
APU_DECLARE(apr_json_value_t *) apr_json_array_first(const apr_json_value_t *arr)
{
apr_json_value_t *val;

Expand All @@ -302,7 +302,7 @@ apr_json_value_t *apr_json_array_first(const apr_json_value_t *arr)
}
}

apr_json_value_t *apr_json_array_next(const apr_json_value_t *arr,
APU_DECLARE(apr_json_value_t *) apr_json_array_next(const apr_json_value_t *arr,
const apr_json_value_t *val)
{
apr_json_value_t *next;
Expand All @@ -322,7 +322,7 @@ apr_json_value_t *apr_json_array_next(const apr_json_value_t *arr,
}
}

apr_json_value_t *apr_json_overlay(apr_pool_t *p,
APU_DECLARE(apr_json_value_t *) apr_json_overlay(apr_pool_t *p,
apr_json_value_t *overlay, apr_json_value_t *base,
int flags)
{
Expand Down

0 comments on commit 60daebf

Please sign in to comment.