Skip to content

Commit 5bba92a

Browse files
authored
vlib: remove modules/functions/fields, deprecated in 2023 (#22750)
1 parent 2390e58 commit 5bba92a

File tree

16 files changed

+29
-668
lines changed

16 files changed

+29
-668
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ freebsd_task:
3535
./v -exclude @vlib/math/*.c.v test vlib/math
3636
test_zip_modules_script: |
3737
echo 'Test modules using thirdparty/zip'
38-
./v test vlib/compress/ vlib/szip/
38+
./v test vlib/compress/
3939
test_self_script: |
4040
echo 'Run test-self'
4141
VTEST_JUST_ESSENTIAL=1 ./v test-self

vlib/gg/gg.js.v

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ pub enum DOMEventType {
3030
clipboard_pasted
3131
files_dropped
3232
num
33-
files_droped @[deprecated: 'use files_dropped instead'; deprecated_after: '2023-08-21']
3433
}
3534

3635
pub struct Event {

vlib/log/log.v

-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ pub fn (mut l Log) set_level(level Level) {
5252
l.level = level
5353
}
5454

55-
// set_output_level sets the internal logging output to `level`.
56-
@[deprecated: 'use .set_level(level) instead']
57-
@[deprecated_after: '2023-09-30']
58-
pub fn (mut l Log) set_output_level(level Level) {
59-
l.level = level
60-
}
61-
6255
// set_full_logpath sets the output label and output path from `full_log_path`.
6356
pub fn (mut l Log) set_full_logpath(full_log_path string) {
6457
rlog_file := os.real_path(full_log_path)

vlib/math/const.v

-64
Original file line numberDiff line numberDiff line change
@@ -39,70 +39,6 @@ pub const max_f64 = 1.797693134862315708145274237317043567981e+308 // 2**1023 *
3939

4040
pub const smallest_non_zero_f64 = 4.940656458412465441765687928682213723651e-324
4141

42-
@[deprecated: 'use built-in constant `min_i8` instead']
43-
@[deprecated_after: '2023-12-31']
44-
pub const min_i8 = i8(-128)
45-
46-
@[deprecated: 'use built-in constant `max_i8` instead']
47-
@[deprecated_after: '2023-12-31']
48-
pub const max_i8 = i8(127)
49-
50-
@[deprecated: 'use built-in constant `min_i16` instead']
51-
@[deprecated_after: '2023-12-31']
52-
pub const min_i16 = i16(-32768)
53-
54-
@[deprecated: 'use built-in constant `max_i16` instead']
55-
@[deprecated_after: '2023-12-31']
56-
pub const max_i16 = i16(32767)
57-
58-
@[deprecated: 'use built-in constant `min_i32` instead']
59-
@[deprecated_after: '2023-12-31']
60-
pub const min_i32 = i32(-2147483648)
61-
62-
@[deprecated: 'use built-in constant `max_i32` instead']
63-
@[deprecated_after: '2023-12-31']
64-
pub const max_i32 = i32(2147483647)
65-
6642
// -9223372036854775808 is wrong, because C compilers parse literal values
6743
// without sign first, and 9223372036854775808 overflows i64, hence the
6844
// consecutive subtraction by 1
69-
70-
@[deprecated: 'use built-in constant `min_i64` instead']
71-
@[deprecated_after: '2023-12-31']
72-
pub const min_i64 = i64(-9223372036854775807 - 1)
73-
74-
@[deprecated: 'use built-in constant `max_i64` instead']
75-
@[deprecated_after: '2023-12-31']
76-
pub const max_i64 = i64(9223372036854775807)
77-
78-
@[deprecated: 'use built-in constant `min_u8` instead']
79-
@[deprecated_after: '2023-12-31']
80-
pub const min_u8 = u8(0)
81-
82-
@[deprecated: 'use built-in constant `max_u8` instead']
83-
@[deprecated_after: '2023-12-31']
84-
pub const max_u8 = u8(255)
85-
86-
@[deprecated: 'use built-in constant `min_u16` instead']
87-
@[deprecated_after: '2023-12-31']
88-
pub const min_u16 = u16(0)
89-
90-
@[deprecated: 'use built-in constant `max_u16` instead']
91-
@[deprecated_after: '2023-12-31']
92-
pub const max_u16 = u16(65535)
93-
94-
@[deprecated: 'use built-in constant `min_u32` instead']
95-
@[deprecated_after: '2023-12-31']
96-
pub const min_u32 = u32(0)
97-
98-
@[deprecated: 'use built-in constant `max_u32` instead']
99-
@[deprecated_after: '2023-12-31']
100-
pub const max_u32 = u32(4294967295)
101-
102-
@[deprecated: 'use built-in constant `min_u64` instead']
103-
@[deprecated_after: '2023-12-31']
104-
pub const min_u64 = u64(0)
105-
106-
@[deprecated: 'use built-in constant `max_u64` instead']
107-
@[deprecated_after: '2023-12-31']
108-
pub const max_u64 = u64(18446744073709551615)

vlib/net/conv/conv.v

-42
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ mut:
88
as_double32 f32
99
}
1010

11-
// htn64 - DON'T USE, use hton64 instead
12-
@[deprecated: 'use hton64() instead']
13-
@[deprecated_after: '2023-12-31']
14-
pub fn htn64(host u64) u64 {
15-
return hton64(host)
16-
}
17-
1811
// htonf32 converts the 32 bit double `host` to the net format
1912
pub fn htonf32(host f32) f32 {
2013
$if little_endian {
@@ -50,13 +43,6 @@ pub fn hton64(host u64) u64 {
5043
}
5144
}
5245

53-
// htn32 - DON'T USE, use hton32 instead
54-
@[deprecated: 'use hton32() instead']
55-
@[deprecated_after: '2023-12-31']
56-
pub fn htn32(host u32) u32 {
57-
return hton32(host)
58-
}
59-
6046
// hton32 converts the 32 bit value `host` to the net format (htonl)
6147
pub fn hton32(host u32) u32 {
6248
$if little_endian {
@@ -66,13 +52,6 @@ pub fn hton32(host u32) u32 {
6652
}
6753
}
6854

69-
// htn16 - DON'T USE, use hton16 instead
70-
@[deprecated: 'use hton16() instead']
71-
@[deprecated_after: '2023-12-31']
72-
pub fn htn16(host u16) u16 {
73-
return hton16(host)
74-
}
75-
7655
// hton16 converts the 16 bit value `host` to the net format (htons)
7756
pub fn hton16(host u16) u16 {
7857
$if little_endian {
@@ -82,37 +61,16 @@ pub fn hton16(host u16) u16 {
8261
}
8362
}
8463

85-
// nth64 - DON'T USE, use ntoh64 instead
86-
@[deprecated: 'use ntoh64() instead']
87-
@[deprecated_after: '2023-12-31']
88-
pub fn nth64(net u64) u64 {
89-
return ntoh64(net)
90-
}
91-
9264
// ntoh64 converts the 64 bit value `net` to the host format (ntohll)
9365
pub fn ntoh64(net u64) u64 {
9466
return hton64(net)
9567
}
9668

97-
// nth32 - DON'T USE, use ntoh32 instead
98-
@[deprecated: 'use ntoh32() instead']
99-
@[deprecated_after: '2023-12-31']
100-
pub fn nth32(net u32) u32 {
101-
return ntoh32(net)
102-
}
103-
10469
// ntoh32 converts the 32 bit value `net` to the host format (ntohl)
10570
pub fn ntoh32(net u32) u32 {
10671
return hton32(net)
10772
}
10873

109-
// nth16 - DON'T USE, use ntoh16 instead
110-
@[deprecated: 'use ntoh16() instead']
111-
@[deprecated_after: '2023-12-31']
112-
pub fn nth16(net u16) u16 {
113-
return ntoh16(net)
114-
}
115-
11674
// ntoh16 converts the 16 bit value `net` to the host format (ntohs)
11775
pub fn ntoh16(net u16) u16 {
11876
return hton16(net)

vlib/sokol/sapp/enums.c.v

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pub enum EventType {
2626
clipboard_pasted
2727
files_dropped
2828
num
29-
files_droped @[deprecated: 'use files_dropped instead'; deprecated_after: '2023-08-21']
3029
}
3130

3231
pub enum MouseButton {

vlib/strconv/format.v

+8-37
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module strconv
22

3+
import strings
4+
35
/*
46
printf/sprintf V implementation
57
@@ -9,17 +11,16 @@ that can be found in the LICENSE file.
911
1012
This file contains the printf/sprintf functions
1113
*/
12-
import strings
1314

15+
// Align_text is used to describe the different ways to align a text - left, right and center
1416
pub enum Align_text {
1517
right = 0
1618
left
1719
center
1820
}
1921

20-
/*
21-
Float conversion utility
22-
*/
22+
// Float conversion utility
23+
2324
// rounding value
2425
const dec_round = [
2526
f64(0.5),
@@ -44,38 +45,9 @@ const dec_round = [
4445
0.00000000000000000005,
4546
]!
4647

47-
/*
48-
const(
49-
// rounding value
50-
dec_round = [
51-
f64(0.44),
52-
0.044,
53-
0.0044,
54-
0.00044,
55-
0.000044,
56-
0.0000044,
57-
0.00000044,
58-
0.000000044,
59-
0.0000000044,
60-
0.00000000044,
61-
0.000000000044,
62-
0.0000000000044,
63-
0.00000000000044,
64-
0.000000000000044,
65-
0.0000000000000044,
66-
0.00000000000000044,
67-
0.000000000000000044,
68-
0.0000000000000000044,
69-
0.00000000000000000044,
70-
0.000000000000000000044,
71-
]
72-
)
73-
*/
74-
// max float 1.797693134862315708145274237317043567981e+308
48+
// Single format functions
7549

76-
/*
77-
Single format functions
78-
*/
50+
// BF_param is used for describing the formatting options for a single interpolated value
7951
pub struct BF_param {
8052
pub mut:
8153
pad_ch u8 = u8(` `) // padding char
@@ -84,11 +56,10 @@ pub mut:
8456
positive bool = true // mandatory: the sign of the number passed
8557
sign_flag bool // flag for print sign as prefix in padding
8658
align Align_text = .right // alignment of the string
87-
allign Align_text = .right @[deprecated: 'use align instead'; deprecated_after: '2023-11-30']
8859
rm_tail_zero bool // remove the tail zeros from floats
8960
}
9061

91-
// format_str returns a `string` formatted according to the options set in `p`.
62+
// format_str returns the `s` formatted, according to the options set in `p`.
9263
@[manualfree]
9364
pub fn format_str(s string, p BF_param) string {
9465
if p.len0 <= 0 {

vlib/szip/README.md

-9
This file was deleted.

0 commit comments

Comments
 (0)