From 036eb94dff029ca74a11d1ec0db39bbc98c30274 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 10 Mar 2025 06:07:59 -0700 Subject: [PATCH] Fix return types in docs for double_to_count and double_to_int --- src/zeek.bif | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/zeek.bif b/src/zeek.bif index 36032ed8bd..3a7bb3644b 100644 --- a/src/zeek.bif +++ b/src/zeek.bif @@ -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 )