pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:2288:
* 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 !=
(ptrdiff_t)
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; #else static int random_fd = -1; #endif