mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
strconv: make v_printf private
This commit is contained in:
parent
7939ca2997
commit
47e10a9fcd
@ -24,7 +24,7 @@ enum Char_parse_state {
|
||||
|
||||
// v_printf prints a sprintf-like formated `string` to the terminal.
|
||||
[deprecated: 'use string interpolation instead']
|
||||
pub fn v_printf(str string, pt ...voidptr) {
|
||||
fn v_printf(str string, pt ...voidptr) {
|
||||
print(v_sprintf(str, ...pt))
|
||||
}
|
||||
|
||||
@ -36,6 +36,7 @@ pub fn v_printf(str string, pt ...voidptr) {
|
||||
// assert strconv.v_sprintf('aaa %G', x) == 'aaa 3.141516'
|
||||
// ```
|
||||
[deprecated: 'use string interpolation instead']
|
||||
[deprecated_after: '2023-06-30']
|
||||
[direct_array_access; manualfree]
|
||||
pub fn v_sprintf(str string, pt ...voidptr) string {
|
||||
mut res := strings.new_builder(pt.len * 16)
|
||||
|
@ -193,8 +193,10 @@ pub fn (mut p Parser) set_path(path string) {
|
||||
p.file_display_path = os.real_path(p.file_name).replace_once(parser.normalised_working_folder,
|
||||
'').replace('\\', '/')
|
||||
p.inside_vlib_file = p.file_name_dir.contains('vlib')
|
||||
p.inside_test_file = p.file_base.ends_with('_test.v') || p.file_base.ends_with('_test.vv')
|
||||
p.inside_test_file = p.file_base.ends_with('_test.v')
|
||||
|| p.file_base.ends_with('_test.vv')
|
||||
|| p.file_base.all_before_last('.v').all_before_last('.').ends_with('_test')
|
||||
|| (p.file_name_dir.contains('vlib/v/slow_tests/inout/') && p.file_base.ends_with('.vv'))
|
||||
|
||||
hash := fnv1a.sum64_string(path)
|
||||
p.unique_prefix = hash.hex_full()
|
||||
|
Loading…
Reference in New Issue
Block a user