Skip to content

Commit 7294c78

Browse files
committed
all: run v fmt -w . in project root
1 parent 1854c16 commit 7294c78

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

examples/desktop/v_as_library/libvlang.v

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn jprintln(text string) {
9797
// 2. typeof(text).name
9898
// 3. auto...
9999
// 4. .call_static_method(meth,text)
100-
meth := libvlang.pkg + '.' + jni.v2j_fn_name(@FN) + '(' + typeof(text).name + ')'
100+
meth := pkg + '.' + jni.v2j_fn_name(@FN) + '(' + typeof(text).name + ')'
101101
auto.call_static_method(meth, text)
102102
}
103103

@@ -107,10 +107,9 @@ fn jprintln(text string) {
107107
*/
108108
// java_float_func is "reflected" from "public static float javaFloatFunc(String s, int i)" in "io.vlang.V"
109109
fn java_float_func(text string, i int) f32 {
110-
return auto.call_static_method(jni.sig(libvlang.pkg, @FN, f32(0), text, i), text,
111-
i).result as f32
110+
return auto.call_static_method(jni.sig(pkg, @FN, f32(0), text, i), text, i).result as f32
112111
}
113112

114113
fn java_void_func(text string, i int) {
115-
auto.call_static_method(jni.sig(libvlang.pkg, @FN, 'void', text, i), text, i)
114+
auto.call_static_method(jni.sig(pkg, @FN, 'void', text, i), text, i)
116115
}

jni.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,13 +319,13 @@ pub fn (jo JavaObject) class_name(env &Env) string {
319319
mut cls := get_object_class(env, obj)
320320
// First get the class object
321321
mut mid := get_method_id(env, cls, 'getClass', '()Ljava/lang/Class;')
322-
cls_obj := call_object_method_a(env, obj, mid, jni.void_arg.data) // NOTE vfmt will cause a compile error here if you only use 'void_arg.data'
322+
cls_obj := call_object_method_a(env, obj, mid, void_arg.data) // NOTE vfmt will cause a compile error here if you only use 'void_arg.data'
323323
// Get the class object's class descriptor
324324
cls = get_object_class(env, cls_obj)
325325
// Find the getName() method on the class object
326326
mid = get_method_id(env, cls, 'getName', '()Ljava/lang/String;')
327327
// Call the getName() to get a string struct back
328-
return call_string_method_a(env, cls_obj, mid, jni.void_arg.data) // NOTE vfmt will cause a compile error here if you only use 'void_arg.data'
328+
return call_string_method_a(env, cls_obj, mid, void_arg.data) // NOTE vfmt will cause a compile error here if you only use 'void_arg.data'
329329
}
330330

331331
@[inline]

0 commit comments

Comments
 (0)