Skip to content

Commit

Permalink
Revert the use of mono_binary_search () in support/supportw.c.
Browse files Browse the repository at this point in the history
This code can't depend on mono/utils and doesn't need the 'fixed'
implementation of bsearch () anyway since keys are never null.
  • Loading branch information
Alex Rønne Petersen committed Jul 26, 2013
1 parent 7a307b7 commit 78db50f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions support/supportw.c
Expand Up @@ -19,7 +19,6 @@
#include "mono/metadata/object.h"
#include "mono/metadata/tabledefs.h"
#include "mono/io-layer/wapi.h"
#include "mono/utils/bsearch.h"

typedef struct {
const char *fname;
Expand Down Expand Up @@ -50,7 +49,7 @@ get_function (const char *name)
{
FnPtr *ptr;

ptr = mono_binary_search (name, functions, NFUNCTIONS, sizeof (FnPtr),
ptr = bsearch (name, functions, NFUNCTIONS, sizeof (FnPtr),
compare_names);

if (ptr == NULL) {
Expand All @@ -68,7 +67,7 @@ supportw_register_delegate (const char *function_name, void *fnptr)

g_return_val_if_fail (function_name && fnptr, FALSE);

ptr = mono_binary_search (function_name, functions, NFUNCTIONS, sizeof (FnPtr),
ptr = bsearch (function_name, functions, NFUNCTIONS, sizeof (FnPtr),
compare_names);

if (ptr == NULL) {
Expand Down

0 comments on commit 78db50f

Please sign in to comment.