@@ -195,14 +195,29 @@ static inline uint64_t php_random_pcgoneseq128xslrr64_rotr64(php_random_uint128_
195195}
196196# endif
197197
198- # define php_random_bytes_throw (b , s ) php_random_bytes((b), (s), 1)
199- # define php_random_bytes_silent (b , s ) php_random_bytes((b), (s), 0)
200- # define php_random_int_throw (min , max , result ) php_random_int((min), (max), (result), 1)
201- # define php_random_int_silent (min , max , result ) php_random_int((min), (max), (result), 0)
202-
203198PHPAPI zend_result php_random_bytes (void * bytes , size_t size , bool should_throw );
204199PHPAPI zend_result php_random_int (zend_long min , zend_long max , zend_long * result , bool should_throw );
205200
201+ static inline zend_result php_random_bytes_throw (void * bytes , size_t size )
202+ {
203+ return php_random_bytes (bytes , size , true);
204+ }
205+
206+ static inline zend_result php_random_bytes_silent (void * bytes , size_t size )
207+ {
208+ return php_random_bytes (bytes , size , false);
209+ }
210+
211+ static inline zend_result php_random_int_throw (zend_long min , zend_long max , zend_long * result )
212+ {
213+ return php_random_int (min , max , result , true);
214+ }
215+
216+ static inline zend_result php_random_int_silent (zend_long min , zend_long max , zend_long * result )
217+ {
218+ return php_random_int (min , max , result , false);
219+ }
220+
206221typedef struct _php_random_status_ {
207222 size_t last_generated_size ;
208223 void * state ;
0 commit comments