pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:837:    pop_n_elems(args);    push_string(end_shared_string(ret));   }      /*! @decl void random_seed(int seed)    *!    *! This function sets the initial value for the random generator.    *!    *! @seealso    *! @[random()] +  *! +  *! @deprecated +  *! @[Random.Deterministic]    */   PMOD_EXPORT void f_random_seed(INT32 args)   {    INT_TYPE i; -  check_all_args("random_seed",args,BIT_INT | BIT_OBJECT, 0); -  -  if(TYPEOF(Pike_sp[-args]) == T_INT) -  { -  i=Pike_sp[-args].u.integer; -  }else{ -  i=hash_svalue(Pike_sp-args); -  } -  my_srand(i); +     pop_n_elems(args);   }      /*! @decl int query_num_arg()    *!    *! Returns the number of arguments given when the previous function was    *! called.    *!    *! This is useful for functions that take a variable number of arguments.    *!
pike.git/src/builtin_functions.c:9355:       /* function(mixed:int) */    ADD_EFUN("programp",f_programp,tFunc(tMix,tInt01),0);       /* function(:int) */    ADD_EFUN("query_num_arg",f_query_num_arg,    tFunc(tNone,tInt),OPT_EXTERNAL_DEPEND);       /* function(int:void) */    ADD_EFUN("random_seed",f_random_seed, -  tFunc(tInt,tVoid),OPT_SIDE_EFFECT); +  tAttr("deprecated",tFunc(tInt,tVoid)),OPT_SIDE_EFFECT);       ADD_EFUN("random_string",f_random_string,    tFunc(tInt,tStr8), OPT_EXTERNAL_DEPEND);       ADD_EFUN2("replace", f_replace,    tOr5(tFunc(tStr tStr tStr,tStr),    tFunc(tStr tArr(tStr) tOr(tArr(tStr), tStr), tStr),    tFunc(tStr tMap(tStr,tStr),tStr),    tFunc(tSetvar(0,tArray) tMix tMix,tVar(0)),    tFunc(tSetvar(1,tMapping) tMix tMix,tVar(1))),