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
This commit is contained in:
commit
8ed503314d
3 changed files with 17 additions and 13 deletions
4
CHANGES
4
CHANGES
|
@ -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
|
7.2.0-dev.280 | 2025-03-07 13:13:39 -0500
|
||||||
|
|
||||||
* GH-4268: Fix printing type constants like `double` (Evan Typanski, Corelight)
|
* GH-4268: Fix printing type constants like `double` (Evan Typanski, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
7.2.0-dev.280
|
7.2.0-dev.283
|
||||||
|
|
24
src/zeek.bif
24
src/zeek.bif
|
@ -2643,18 +2643,6 @@ function int_to_count%(n: int%): count
|
||||||
return zeek::val_mgr->Count(n);
|
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`.
|
## Converts a :zeek:type:`double` to a :zeek:type:`int`.
|
||||||
##
|
##
|
||||||
## d: The :zeek:type:`double` to convert.
|
## 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().
|
## follows typical rounding rules, as implemented by rint().
|
||||||
##
|
##
|
||||||
## .. zeek:see:: double_to_time
|
## .. 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
|
function double_to_count%(d: double%): count
|
||||||
%{
|
%{
|
||||||
if ( d < 0.0 )
|
if ( d < 0.0 )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue