Don't use implicit casts from void * since this will get included from C++

Wed Oct 25 19:11:03 2000  Owen Taylor  <otaylor@redhat.com>

	* gbsearcharray.h (g_bsearch_array_get_nth): Don't use implicit
	casts from void * since this will get included from C++ too
	at times.
This commit is contained in:
Owen Taylor 2000-10-25 23:39:32 +00:00 committed by Owen Taylor
parent 900d0ed069
commit b1278dc611
3 changed files with 10 additions and 4 deletions

View File

@ -82,7 +82,7 @@ g_bsearch_array_lookup (GBSearchArray *barray,
GBSearchCompareFunc cmp_func = barray->cmp_func;
gint sizeof_node = barray->sizeof_node;
guint n_nodes = barray->n_nodes;
guint8 *nodes = barray->nodes;
guint8 *nodes = (guint8 *) barray->nodes;
nodes -= sizeof_node;
do
@ -115,7 +115,7 @@ g_bsearch_array_get_nth (GBSearchArray *barray,
{
if (n < barray->n_nodes)
{
guint8 *nodes = barray->nodes;
guint8 *nodes = (guint8 *) barray->nodes;
return nodes + n * barray->sizeof_node;
}

View File

@ -1,3 +1,9 @@
Wed Oct 25 19:11:03 2000 Owen Taylor <otaylor@redhat.com>
* gbsearcharray.h (g_bsearch_array_get_nth): Don't use implicit
casts from void * since this will get included from C++ too
at times.
Thu Oct 26 00:30:27 2000 Tim Janik <timj@gtk.org>
* gvaluetypes.[hc]: added g_value_set_static_string().

View File

@ -82,7 +82,7 @@ g_bsearch_array_lookup (GBSearchArray *barray,
GBSearchCompareFunc cmp_func = barray->cmp_func;
gint sizeof_node = barray->sizeof_node;
guint n_nodes = barray->n_nodes;
guint8 *nodes = barray->nodes;
guint8 *nodes = (guint8 *) barray->nodes;
nodes -= sizeof_node;
do
@ -115,7 +115,7 @@ g_bsearch_array_get_nth (GBSearchArray *barray,
{
if (n < barray->n_nodes)
{
guint8 *nodes = barray->nodes;
guint8 *nodes = (guint8 *) barray->nodes;
return nodes + n * barray->sizeof_node;
}