Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
654a8a37
Commit
654a8a37
authored
Dec 21, 2015
by
Jernej Virag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix set cpp -> java marshaling
parent
163fbe4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
support-lib/jni/Marshal.hpp
support-lib/jni/Marshal.hpp
+4
-3
No files found.
support-lib/jni/Marshal.hpp
View file @
654a8a37
...
@@ -411,13 +411,14 @@ namespace djinni
...
@@ -411,13 +411,14 @@ namespace djinni
static
LocalRef
<
JniType
>
fromCpp
(
JNIEnv
*
jniEnv
,
const
CppType
&
c
)
static
LocalRef
<
JniType
>
fromCpp
(
JNIEnv
*
jniEnv
,
const
CppType
&
c
)
{
{
assert
(
c
.
size
()
<=
std
::
numeric_limits
<
jint
>::
max
());
const
auto
&
data
=
JniClass
<
SetJniInfo
>::
get
();
const
auto
&
data
=
JniClass
<
SetJniInfo
>::
get
();
auto
j
=
LocalRef
<
jobject
>
(
jniEnv
,
jniEnv
->
NewObject
(
data
.
clazz
.
get
(),
data
.
constructor
));
assert
(
c
.
size
()
<=
std
::
numeric_limits
<
jint
>::
max
());
auto
size
=
static_cast
<
jint
>
(
c
.
size
());
auto
j
=
LocalRef
<
jobject
>
(
jniEnv
,
jniEnv
->
NewObject
(
data
.
clazz
.
get
(),
data
.
constructor
,
size
));
jniExceptionCheck
(
jniEnv
);
jniExceptionCheck
(
jniEnv
);
for
(
const
auto
&
ce
:
c
)
for
(
const
auto
&
ce
:
c
)
{
{
auto
je
=
T
::
fromCpp
(
jniEnv
,
ce
);
auto
je
=
T
::
Boxed
::
fromCpp
(
jniEnv
,
ce
);
jniEnv
->
CallBooleanMethod
(
j
,
data
.
method_add
,
get
(
je
));
jniEnv
->
CallBooleanMethod
(
j
,
data
.
method_add
,
get
(
je
));
jniExceptionCheck
(
jniEnv
);
jniExceptionCheck
(
jniEnv
);
}
}
...
...
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