Sync with portableproplib-0.6.8.
This commit is contained in:
parent
121d0fbb64
commit
371be9703e
2
3RDPARTY
2
3RDPARTY
@ -17,5 +17,5 @@ internal use in the code:
|
||||
|
||||
- libfetch-2.34 from NetBSD (pkgsrc/net/libfetch): lib/fetch
|
||||
|
||||
- portableproplib-0.6.4 (lib/portableproplib) from
|
||||
- portableproplib-0.6.8 (lib/portableproplib) from
|
||||
https://github.com/xtraeme/portableproplib
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* $NetBSD: prop_array.h,v 1.8 2008/09/11 13:15:13 haad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 Juan Romero Pardines.
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
|
@ -640,13 +640,11 @@ _prop_array_add_first(prop_array_t pa, prop_object_t po)
|
||||
prop_object_retain(opo);
|
||||
pa->pa_array[cnt] = opo;
|
||||
prop_object_release(opo);
|
||||
//printf("%s: po %p\n", __func__, pa->pa_array[cnt]);
|
||||
}
|
||||
/* passed in object is now the first element */
|
||||
pa->pa_array[0] = po;
|
||||
pa->pa_version++;
|
||||
pa->pa_count++;
|
||||
//printf("%s: po %p\n", __func__, pa->pa_array[0]);
|
||||
} else {
|
||||
pa->pa_array[pa->pa_count++] = po;
|
||||
pa->pa_version++;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: prop_ingest.c,v 1.4 2012/07/27 09:10:59 pooka Exp $ */
|
||||
/* $NetBSD: prop_ingest.c,v 1.5 2014/09/05 05:19:24 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@ -44,7 +44,7 @@ struct _prop_ingest_context {
|
||||
* Allocate and initialize an ingest context.
|
||||
*/
|
||||
prop_ingest_context_t
|
||||
prop_ingest_context_alloc(void *private)
|
||||
prop_ingest_context_alloc(void *xprivate)
|
||||
{
|
||||
prop_ingest_context_t ctx;
|
||||
|
||||
@ -53,7 +53,7 @@ prop_ingest_context_alloc(void *private)
|
||||
ctx->pic_error = PROP_INGEST_ERROR_NO_ERROR;
|
||||
ctx->pic_type = PROP_TYPE_UNKNOWN;
|
||||
ctx->pic_key = NULL;
|
||||
ctx->pic_private = private;
|
||||
ctx->pic_private = xprivate;
|
||||
}
|
||||
return (ctx);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: prop_number.c,v 1.26 2014/03/26 18:12:46 christos Exp $ */
|
||||
/* $NetBSD: prop_number.c,v 1.27 2014/09/05 05:19:24 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@ -36,19 +36,21 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct _prop_number_value {
|
||||
union {
|
||||
int64_t pnu_signed;
|
||||
uint64_t pnu_unsigned;
|
||||
} pnv_un;
|
||||
#define pnv_signed pnv_un.pnu_signed
|
||||
#define pnv_unsigned pnv_un.pnu_unsigned
|
||||
unsigned int pnv_is_unsigned :1,
|
||||
:31;
|
||||
};
|
||||
|
||||
struct _prop_number {
|
||||
struct _prop_object pn_obj;
|
||||
struct rb_node pn_link;
|
||||
struct _prop_number_value {
|
||||
union {
|
||||
int64_t pnu_signed;
|
||||
uint64_t pnu_unsigned;
|
||||
} pnv_un;
|
||||
#define pnv_signed pnv_un.pnu_signed
|
||||
#define pnv_unsigned pnv_un.pnu_unsigned
|
||||
unsigned int pnv_is_unsigned :1,
|
||||
:31;
|
||||
} pn_value;
|
||||
struct _prop_number_value pn_value;
|
||||
};
|
||||
|
||||
_PROP_POOL_INIT(_prop_number_pool, sizeof(struct _prop_number), "propnmbr")
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rb.c,v 1.9 2010/11/17 13:19:32 tron Exp $ */
|
||||
/* $NetBSD: rb.c,v 1.14 2019/03/08 09:14:54 roy Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -123,7 +123,7 @@ rb_tree_find_node_geq(struct rb_tree *rbt, const void *key)
|
||||
parent = parent->rb_nodes[diff < 0];
|
||||
}
|
||||
|
||||
return RB_NODETOITEM(rbto, last);
|
||||
return last == NULL ? NULL : RB_NODETOITEM(rbto, last);
|
||||
}
|
||||
|
||||
void *
|
||||
@ -144,7 +144,7 @@ rb_tree_find_node_leq(struct rb_tree *rbt, const void *key)
|
||||
parent = parent->rb_nodes[diff < 0];
|
||||
}
|
||||
|
||||
return RB_NODETOITEM(rbto, last);
|
||||
return last == NULL ? NULL : RB_NODETOITEM(rbto, last);
|
||||
}
|
||||
|
||||
void *
|
||||
|
Loading…
Reference in New Issue
Block a user