Skip to content

Commit 3631dfa

Browse files
authored
builtin: use a conditional import of strconv in float.c.v (#25412)
1 parent 16683ed commit 3631dfa

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

‎vlib/builtin/float.c.v‎

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
// Use of this source code is governed by an MIT license that can be found in the LICENSE file.
33
module builtin
44

5-
// TODO: implement compile time conditional include
6-
// [if !nofloat]
7-
import strconv
5+
$if !nofloat ? {
6+
import strconv
7+
}
88

99
$if !native {
1010
#include <float.h>
1111
}
1212

13-
/*
14-
-----------------------------------
15-
----- f64 to string functions -----
16-
*/
17-
// str return a `f64` as `string` in suitable notation.
13+
// str returns a string representation of the given `f64` in a suitable notation.
1814
@[inline]
1915
pub fn (x f64) str() string {
2016
unsafe {
@@ -36,7 +32,7 @@ pub fn (x f64) str() string {
3632
}
3733
}
3834

39-
// strg return a `f64` as `string` in "g" printf format
35+
// strg return a `f64` as `string` in "g" printf format.
4036
@[inline]
4137
pub fn (x f64) strg() string {
4238
if x == 0 {

0 commit comments

Comments
 (0)