pike.git / src / modules / Image / pattern.c

version» Context lines:

pike.git/src/modules/Image/pattern.c:526:   **!   **! see also test, noise   */      static void select_random_string(INT32 args)   {    if(args>1)    Pike_error("Too may arguments.\n");    if(!args)    { -  push_svalue(simple_mapping_string_lookup(get_builtin_constants(), -  "random_string")); -  if(TYPEOF(sp[-1])!=T_FUNCTION) +  struct svalue *random_string = +  simple_mapping_string_lookup(get_builtin_constants(), "random_string"); +  if(!random_string || (TYPEOF(*random_string) != T_FUNCTION))    Pike_error("Unable to resolve random function.\n"); -  +  push_svalue(random_string);    }    else if(TYPEOF(sp[-1])==T_INT)    {    push_constant_text("Random.Deterministic");    SAFE_APPLY_MASTER("resolv_or_error",1);    if(TYPEOF(sp[-1])!=T_PROGRAM)    Pike_error("Unable to resolve Random.Deterministic program.\n");    struct program *o = sp[-1].u.program;    stack_swap();    push_object(clone_object(o, 1));