Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
16e082d4
Commit
16e082d4
authored
Aug 23, 2018
by
Sylvain Berfini
🐮
Browse files
Fixed const list in java wrapper
parent
9ee7b858
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
wrappers/java/genwrapper.py
wrappers/java/genwrapper.py
+2
-0
wrappers/java/jni.mustache
wrappers/java/jni.mustache
+3
-1
No files found.
wrappers/java/genwrapper.py
View file @
16e082d4
...
...
@@ -259,6 +259,8 @@ class JavaTranslator(object):
methodDict
[
'hasNormalReturn'
]
=
not
methodDict
[
'hasListReturn'
]
and
not
methodDict
[
'hasStringReturn'
]
and
not
methodDict
[
'hasByteArrayReturn'
]
methodDict
[
'name'
]
=
'Java_'
+
self
.
jni_package
+
className
+
'Impl_'
+
_method
.
name
.
translate
(
self
.
nameTranslator
)
methodDict
[
'notStatic'
]
=
not
static
methodDict
[
'isConstList'
]
=
_method
.
returnType
.
isconst
methodDict
[
'isNotConstList'
]
=
not
_method
.
returnType
.
isconst
if
_method
.
name
.
to_c
()[
-
1
]
==
'2'
:
methodDict
[
'name'
]
+=
"2"
...
...
wrappers/java/jni.mustache
View file @
16e082d4
...
...
@@ -428,6 +428,7 @@ void Java_{{jniPackage}}{{className}}Impl_removeListener(JNIEnv* env, jobject th
break;
}
}
{{#
isNotConstList
}}
bctbx_list_free(cbs_list);
{{/
isNotConstList
}}
}
{{/
isMultiListener
}}
{{/
interfaces
}}
...
...
@@ -474,7 +475,7 @@ jobject Java_{{jni_package}}CoreImpl_getMediastreamerFactory(JNIEnv *env, jobjec
{{/
isObjList
}}
}
{{/
lists
}}{{#
hasListReturn
}}
const
bctbx_list_t *list =
{{
c_name
}}
(
{{#
notStatic
}}
cptr
{{/
notStatic
}}{{
params_impl
}}
);
{{#
isConstList
}}
const
{{/
isConstList
}}
bctbx_list_t *list =
{{
c_name
}}
(
{{#
notStatic
}}
cptr
{{/
notStatic
}}{{
params_impl
}}
);
size_t count = bctbx_list_size(list);
{{#
isRealObjectArray
}}
LinphoneJavaBindings *ljb = (LinphoneJavaBindings *)linphone_factory_get_user_data(linphone_factory_get());
...
...
@@ -493,6 +494,7 @@ jobject Java_{{jni_package}}CoreImpl_getMediastreamerFactory(JNIEnv *env, jobjec
}
list = bctbx_list_next(list);
}
{{#
isNotConstList
}}
bctbx_list_free(list);
{{/
isNotConstList
}}
{{/
hasListReturn
}}{{#
hasByteArrayReturn
}}
{{
c_type_return
}}
jni_result =
{{
c_name
}}
(
{{#
notStatic
}}
cptr
{{/
notStatic
}}{{
params_impl
}}
);
if (!jni_result) return NULL;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment