Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
873aefae
Commit
873aefae
authored
Jan 09, 2013
by
Andrey Kamaev
Committed by
OpenCV Buildbot
Jan 09, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #279 from taka-no-me:mingw_java
parents
46cf2e96
da908961
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
gen_java.py
modules/java/generator/gen_java.py
+6
-3
No files found.
modules/java/generator/gen_java.py
View file @
873aefae
...
@@ -1243,6 +1243,10 @@ extern "C" {
...
@@ -1243,6 +1243,10 @@ extern "C" {
jni_name
=
"&
%(n)
s"
jni_name
=
"&
%(n)
s"
else
:
else
:
jni_name
=
"
%(n)
s"
jni_name
=
"
%(n)
s"
if
not
a
.
out
and
not
"jni_var"
in
type_dict
[
a
.
ctype
]:
# explicit cast to C type to avoid ambiguous call error on platforms (mingw)
# where jni types are different from native types (e.g. jint is not the same as int)
jni_name
=
"(
%
s)
%
s"
%
(
a
.
ctype
,
jni_name
)
if
not
a
.
ctype
:
# hidden
if
not
a
.
ctype
:
# hidden
jni_name
=
a
.
defval
jni_name
=
a
.
defval
cvargs
.
append
(
type_dict
[
a
.
ctype
]
.
get
(
"jni_name"
,
jni_name
)
%
{
"n"
:
a
.
name
})
cvargs
.
append
(
type_dict
[
a
.
ctype
]
.
get
(
"jni_name"
,
jni_name
)
%
{
"n"
:
a
.
name
})
...
@@ -1267,8 +1271,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
...
@@ -1267,8 +1271,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
LOGD("$module::$fname()");
LOGD("$module::$fname()");
$prologue
$prologue
$retval$cvname( $cvargs );
$retval$cvname( $cvargs );
$epilogue
$epilogue$ret
$ret
} catch(cv::Exception e) {
} catch(cv::Exception e) {
LOGD("$module::$fname() catched cv::Exception:
%
s", e.what());
LOGD("$module::$fname() catched cv::Exception:
%
s", e.what());
jclass je = env->FindClass("org/opencv/core/CvException");
jclass je = env->FindClass("org/opencv/core/CvException");
...
@@ -1292,7 +1295,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
...
@@ -1292,7 +1295,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
args
=
", "
.
join
([
"
%
s
%
s"
%
(
type_dict
[
a
.
ctype
]
.
get
(
"jni_type"
),
a
.
name
)
for
a
in
jni_args
]),
\
args
=
", "
.
join
([
"
%
s
%
s"
%
(
type_dict
[
a
.
ctype
]
.
get
(
"jni_type"
),
a
.
name
)
for
a
in
jni_args
]),
\
argst
=
", "
.
join
([
type_dict
[
a
.
ctype
]
.
get
(
"jni_type"
)
for
a
in
jni_args
]),
\
argst
=
", "
.
join
([
type_dict
[
a
.
ctype
]
.
get
(
"jni_type"
)
for
a
in
jni_args
]),
\
prologue
=
"
\n
"
.
join
(
c_prologue
),
\
prologue
=
"
\n
"
.
join
(
c_prologue
),
\
epilogue
=
" "
.
join
(
c_epilogue
),
\
epilogue
=
" "
.
join
(
c_epilogue
)
+
(
"
\n
"
if
c_epilogue
else
""
)
,
\
ret
=
ret
,
\
ret
=
ret
,
\
cvname
=
cvname
,
\
cvname
=
cvname
,
\
cvargs
=
", "
.
join
(
cvargs
),
\
cvargs
=
", "
.
join
(
cvargs
),
\
...
...
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