pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:2101:    Pike_error("Illegal return value from random_string.\n");    THIS->int_buffer = ((INT64 *)Pike_sp[-1].u.string->str)[0];    THIS->buffer_bits = 64;    pop_stack();    }       static INT_TYPE read_int(INT_TYPE limit)    {    if(limit <= 1) return 0;    int bits = my_log2(limit-1)+1; -  int mask = (1<<bits)-1; +  INT64 mask = (1L<<bits)-1;    for(int i=0; i<1000; i++)    {    if(THIS->buffer_bits < bits)    fill_int_buffer();    INT_TYPE ret = THIS->int_buffer&mask;    THIS->int_buffer >>= bits;    THIS->buffer_bits -= bits;    if( ret < limit )    return ret;    }