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.62 2000/03/07 21:23:41 hubbe Exp $"); + RCSID("$Id: array.c,v 1.63 2000/03/26 01:53:58 mast Exp $");      struct array empty_array=   {    1, /* Never free */   #ifdef PIKE_SECURITY    0,   #endif    &empty_array, /* Next */    &empty_array, /* previous (circular) */    0, /* Size = 0 */
pike.git/src/array.c:693:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;       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;       case T_STRING: -  return my_strcmp(a->u.string, b->u.string); +  return my_quick_strcmp(a->u.string, b->u.string);       default:    return set_svalue_cmpfun(a,b);    }   }      static int alpha_svalue_cmpfun(struct svalue *a, struct svalue *b)   {    if(a->type == b->type)    {
pike.git/src/array.c:765:   /*    * return an 'order' suitable for making mappings and multisets    */   INT32 *get_set_order(struct array *a)   {    return get_order(a, set_svalue_cmpfun);   }      /*    * return an 'order' suitable for switches. +  * +  * Note: This is used by encode_value_canonic(). It must keep the +  * sorting rules for all the types that function allows in multiset +  * and mapping indices.    */   INT32 *get_switch_order(struct array *a)   {    return get_order(a, switch_svalue_cmpfun);   }         /*    * return an 'order' suitable for sorting.    */