Branch: Tag:

2016-03-09

2016-03-09 21:07:25 by Martin Nilsson <nilsson@fastmail.com>

Change the _random interface to provide rnadom_string and random from the called random object.

2218:    int f = low_find_lfun(o->prog, LFUN__RANDOM);    if (f < 0)    Pike_error("Calling undefined lfun::%s.\n", lfun_names[LFUN__RANDOM]); -  apply_low(o, f, 0); +  struct object *co = Pike_fp->current_object; +  ref_push_function(co, f_RandomInterface_random_string_fun_num); +  /* FIXME: precompiler doesn't generate usable fun_nums for variant +  symbols. */ +  ref_push_function(co, find_shared_string_identifier(MK_STRING("random"), +  co->prog)); +  apply_low(o, f, 2);    }   }