pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:2230:    * random_string() function, and pushes it on the stack.    */   PMOD_EXPORT void push_random_string(unsigned len)   {    struct svalue *random =    simple_mapping_string_lookup(get_builtin_constants(), "random_string");    if(!random || (TYPEOF(*random) != T_FUNCTION))    Pike_error("Unable to resolve random function.\n");    push_int(len);    apply_svalue(random, 1); -  if(TYPEOF(Pike_sp[-1])!=T_STRING || Pike_sp[-1].u.string->len != len) +  if(TYPEOF(Pike_sp[-1])!=T_STRING || Pike_sp[-1].u.string->len != len || +  Pike_sp[-1].u.string->size_shift != 0)    Pike_error("Couldn't generate random string.\n");   }      #ifdef __NT__   #include <wincrypt.h>   static HCRYPTPROV crypto_handle;   PIKECLASS RandomSystem   {    INHERIT RandomInterface;