mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
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
(cherry picked from commit 8ed503314d
)
This commit is contained in:
parent
c9bceafbf5
commit
aadf5d3b15
3 changed files with 19 additions and 13 deletions
6
CHANGES
6
CHANGES
|
@ -1,3 +1,9 @@
|
|||
7.1.0-10 | 2025-03-18 13:59:06 -0700
|
||||
|
||||
* Fix return types in docs for double_to_count and double_to_int (Tim Wojtulewicz, Corelight)
|
||||
|
||||
(cherry picked from commit 8ed503314d6b61fa2945b9e39a234184ef94f95a)
|
||||
|
||||
7.1.0-9 | 2025-03-18 13:57:55 -0700
|
||||
|
||||
* CI: Unconditionally upgrade pip on macOS (Tim Wojtulewicz, Corelight)
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
7.1.0-9
|
||||
7.1.0-10
|
||||
|
|
24
src/zeek.bif
24
src/zeek.bif
|
@ -2639,18 +2639,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.
|
||||
|
@ -2659,6 +2647,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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue