From e2e08f3f6c9947d49d7790df780e248a52956389 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm <mast@lysator.liu.se> Date: Sat, 28 Nov 2009 14:13:30 +0100 Subject: [PATCH] Allow external access to the more useful svalue cmpfun's. Rev: src/array.c:1.224 Rev: src/array.h:1.84 --- src/array.c | 6 +++--- src/array.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/array.c b/src/array.c index c1bdc944db..eebf365ec2 100644 --- a/src/array.c +++ b/src/array.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: array.c,v 1.223 2009/02/12 21:06:27 srb Exp $ +|| $Id: array.c,v 1.224 2009/11/28 13:13:30 mast Exp $ */ #include "global.h" @@ -994,7 +994,7 @@ static INLINE int lfun_cmp (const struct svalue *a, const struct svalue *b) return 2; } -INLINE int set_svalue_cmpfun(const struct svalue *a, const struct svalue *b) +int set_svalue_cmpfun(const struct svalue *a, const struct svalue *b) { int res, typediff = a->type - b->type; @@ -1090,7 +1090,7 @@ static int switch_svalue_cmpfun(const struct svalue *a, const struct svalue *b) } } -static int alpha_svalue_cmpfun(const struct svalue *a, const struct svalue *b) +int alpha_svalue_cmpfun(const struct svalue *a, const struct svalue *b) { int res, typediff = a->type - b->type; diff --git a/src/array.h b/src/array.h index 67d90057a9..15c3b6cb49 100644 --- a/src/array.h +++ b/src/array.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: array.h,v 1.83 2009/04/21 17:48:14 grubba Exp $ +|| $Id: array.h,v 1.84 2009/11/28 13:13:30 mast Exp $ */ #ifndef ARRAY_H @@ -131,7 +131,8 @@ PMOD_EXPORT struct array *copy_array(struct array *v); PMOD_EXPORT void check_array_for_destruct(struct array *v); PMOD_EXPORT INT32 array_find_destructed_object(struct array *v); INT32 *get_order(struct array *v, cmpfun fun); -INLINE int set_svalue_cmpfun(const struct svalue *a, const struct svalue *b); +int set_svalue_cmpfun(const struct svalue *a, const struct svalue *b); +int alpha_svalue_cmpfun(const struct svalue *a, const struct svalue *b); PMOD_EXPORT void sort_array_destructively(struct array *v); PMOD_EXPORT INT32 *stable_sort_array_destructively(struct array *v); PMOD_EXPORT INT32 *get_set_order(struct array *a); -- GitLab