Lines Matching refs:engine

80 PHPAPI uint32_t php_random_range32(php_random_algo_with_state engine, uint32_t umax)  in php_random_range32()  argument
82 const php_random_algo *algo = engine.algo; in php_random_range32()
83 void *state = engine.state; in php_random_range32()
139 PHPAPI uint64_t php_random_range64(php_random_algo_with_state engine, uint64_t umax) in php_random_range64() argument
141 const php_random_algo *algo = engine.algo; in php_random_range64()
142 void *state = engine.state; in php_random_range64()
232 php_random_status_free(randomizer->engine.state, false); in randomizer_free_obj()
255 php_random_engine *engine = zend_object_alloc(sizeof(php_random_engine), ce); in php_random_engine_common_init() local
257 zend_object_std_init(&engine->std, ce); in php_random_engine_common_init()
258 object_properties_init(&engine->std, ce); in php_random_engine_common_init()
260 engine->engine = (php_random_algo_with_state){ in php_random_engine_common_init()
264 engine->std.handlers = handlers; in php_random_engine_common_init()
266 return engine; in php_random_engine_common_init()
271 php_random_engine *engine = php_random_engine_from_obj(object); in php_random_engine_common_free_object() local
273 php_random_status_free(engine->engine.state, false); in php_random_engine_common_free_object()
282 new_engine->engine.algo = old_engine->engine.algo; in php_random_engine_common_clone_object()
283 if (old_engine->engine.state) { in php_random_engine_common_clone_object()
284 …new_engine->engine.state = php_random_status_copy(old_engine->engine.algo, old_engine->engine.stat… in php_random_engine_common_clone_object()
293 PHPAPI zend_long php_random_range(php_random_algo_with_state engine, zend_long min, zend_long max) in php_random_range() argument
298 return (zend_long) (php_random_range64(engine, umax) + min); in php_random_range()
301 return (zend_long) (php_random_range32(engine, umax) + min); in php_random_range()