pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:16:   #include "pike_types.h"   #include "fsort.h"   #include "builtin_functions.h"   #include "pike_memory.h"   #include "gc.h"   #include "main.h"   #include "security.h"   #include "stuff.h"   #include "bignum.h"    - RCSID("$Id: array.c,v 1.104 2001/04/15 16:13:17 mast Exp $"); + RCSID("$Id: array.c,v 1.105 2001/04/30 17:31:28 mast Exp $");      PMOD_EXPORT struct array empty_array=   {    PIKE_CONSTANT_MEMOBJ_INIT(1), /* Never free */    &empty_array, /* Next */    &empty_array, /* previous (circular) */    0, /* Size = 0 */    0, /* malloced Size = 0 */    0, /* no types */    0, /* no flags */
pike.git/src/array.c:639:       get_order_fsort(current_order,    current_order+v->size-1,    fun,    ITEM(v));       UNSET_ONERROR(tmp);    return current_order;   }    - static INLINE int set_svalue_cmpfun(struct svalue *a, struct svalue *b) + INLINE int set_svalue_cmpfun(const struct svalue *a, const struct svalue *b)   {    INT32 def,fun;    if(a->type == b->type)    {    switch(a->type)    {    case T_FLOAT:    if(a->u.float_number < b->u.float_number) return -1;    if(a->u.float_number > b->u.float_number) return 1;    return 0;
pike.git/src/array.c:759:    pop_stack();    return 0;    }    pop_stack();    }    }       return def;   }    - static int switch_svalue_cmpfun(struct svalue *a, struct svalue *b) + static int switch_svalue_cmpfun(const struct svalue *a, const struct svalue *b)   {    if(a->type == b->type)    {    switch(a->type)    {    case T_INT:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;   
pike.git/src/array.c:786:    return DO_NOT_WARN((int)my_quick_strcmp(a->u.string, b->u.string));       default:    return set_svalue_cmpfun(a,b);    }    }else{    return a->type - b->type;    }   }    - static int alpha_svalue_cmpfun(struct svalue *a, struct svalue *b) + static int alpha_svalue_cmpfun(const struct svalue *a, const struct svalue *b)   {    if(a->type == b->type)    {    switch(a->type)    {    case T_INT:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;