Merge remote-tracking branch 'origin/topic/timw/fix-double-to-docs'

* origin/topic/timw/fix-double-to-docs:
  Fix return types in docs for double_to_count and double_to_int
This commit is contained in:
Tim Wojtulewicz 2025-03-10 06:11:40 -07:00
commit 8ed503314d
3 changed files with 17 additions and 13 deletions

View file

@ -1,3 +1,7 @@
7.2.0-dev.283 | 2025-03-10 06:11:40 -0700
* Fix return types in docs for double_to_count and double_to_int (Tim Wojtulewicz, Corelight)
7.2.0-dev.280 | 2025-03-07 13:13:39 -0500
* GH-4268: Fix printing type constants like `double` (Evan Typanski, Corelight)

View file

@ -1 +1 @@
7.2.0-dev.280
7.2.0-dev.283

View file

@ -2643,18 +2643,6 @@ function int_to_count%(n: int%): count
return zeek::val_mgr->Count(n);
%}
## Converts a :zeek:type:`double` to a :zeek:type:`count`.
##
## d: The :zeek:type:`double` to convert.
##
## Returns: The :zeek:type:`double` *d* as unsigned integer, or 0 if *d* < 0.0.
## The value returned follows typical rounding rules, as implemented
## by rint().
function double_to_int%(d: double%): int
%{
return zeek::val_mgr->Int(zeek_int_t(rint(d)));
%}
## Converts a :zeek:type:`double` to a :zeek:type:`int`.
##
## d: The :zeek:type:`double` to convert.
@ -2663,6 +2651,18 @@ function double_to_int%(d: double%): int
## follows typical rounding rules, as implemented by rint().
##
## .. zeek:see:: double_to_time
function double_to_int%(d: double%): int
%{
return zeek::val_mgr->Int(zeek_int_t(rint(d)));
%}
## Converts a :zeek:type:`double` to a :zeek:type:`count`.
##
## d: The :zeek:type:`double` to convert.
##
## Returns: The :zeek:type:`double` *d* as unsigned integer, or 0 if *d* < 0.0.
## The value returned follows typical rounding rules, as implemented
## by rint().
function double_to_count%(d: double%): count
%{
if ( d < 0.0 )