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
cd05b91d
Commit
cd05b91d
authored
Nov 04, 2014
by
Jacob Potter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't release parameter LocalRefs (causes ART to spew warnings)
parent
7cbe944f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
14 deletions
+0
-14
example/generated-src/jni/NativeSortItems.cpp
example/generated-src/jni/NativeSortItems.cpp
+0
-2
src/source/JNIGenerator.scala
src/source/JNIGenerator.scala
+0
-3
test-suite/generated-src/jni/NativeTestHelpers.cpp
test-suite/generated-src/jni/NativeTestHelpers.cpp
+0
-9
No files found.
example/generated-src/jni/NativeSortItems.cpp
View file @
cd05b91d
...
@@ -26,7 +26,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_textsort_SortItems_00024NativeProxy_nat
...
@@ -26,7 +26,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_textsort_SortItems_00024NativeProxy_nat
DJINNI_FUNCTION_PROLOGUE1
(
jniEnv
,
nativeRef
);
DJINNI_FUNCTION_PROLOGUE1
(
jniEnv
,
nativeRef
);
const
std
::
shared_ptr
<::
textsort
::
SortItems
>
&
ref
=
*
reinterpret_cast
<
const
std
::
shared_ptr
<::
textsort
::
SortItems
>*>
(
nativeRef
);
const
std
::
shared_ptr
<::
textsort
::
SortItems
>
&
ref
=
*
reinterpret_cast
<
const
std
::
shared_ptr
<::
textsort
::
SortItems
>*>
(
nativeRef
);
::
textsort
::
ItemList
c_items
=
NativeItemList
::
fromJava
(
jniEnv
,
j_items
);
::
textsort
::
ItemList
c_items
=
NativeItemList
::
fromJava
(
jniEnv
,
j_items
);
jniEnv
->
DeleteLocalRef
(
j_items
);
ref
->
sort
(
c_items
);
ref
->
sort
(
c_items
);
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
...
@@ -37,7 +36,6 @@ CJNIEXPORT jobject JNICALL Java_com_dropbox_textsort_SortItems_createWithListene
...
@@ -37,7 +36,6 @@ CJNIEXPORT jobject JNICALL Java_com_dropbox_textsort_SortItems_createWithListene
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
shared_ptr
<::
textsort
::
TextboxListener
>
c_listener
=
NativeTextboxListener
::
fromJava
(
jniEnv
,
j_listener
);
std
::
shared_ptr
<::
textsort
::
TextboxListener
>
c_listener
=
NativeTextboxListener
::
fromJava
(
jniEnv
,
j_listener
);
jniEnv
->
DeleteLocalRef
(
j_listener
);
std
::
shared_ptr
<::
textsort
::
SortItems
>
cr
=
::
textsort
::
SortItems
::
create_with_listener
(
c_listener
);
std
::
shared_ptr
<::
textsort
::
SortItems
>
cr
=
::
textsort
::
SortItems
::
create_with_listener
(
c_listener
);
...
...
src/source/JNIGenerator.scala
View file @
cd05b91d
...
@@ -323,9 +323,6 @@ class JNIGenerator(spec: Spec) extends Generator(spec) {
...
@@ -323,9 +323,6 @@ class JNIGenerator(spec: Spec) extends Generator(spec) {
val
localVar
=
"c_"
+
idCpp
.
local
(
p
.
ident
)
val
localVar
=
"c_"
+
idCpp
.
local
(
p
.
ident
)
val
paramName
=
"j_"
+
idJava
.
local
(
p
.
ident
)
val
paramName
=
"j_"
+
idJava
.
local
(
p
.
ident
)
w
.
wl
(
s
"$cppType $localVar = $jniHelperClass::fromJava(jniEnv, $paramName);"
)
w
.
wl
(
s
"$cppType $localVar = $jniHelperClass::fromJava(jniEnv, $paramName);"
)
if
(
isJavaHeapObject
(
p
.
ty
))
{
w
.
wl
(
s
"jniEnv->DeleteLocalRef($paramName);"
)
}
}
}
val
callArgs
=
m
.
params
.
map
(
p
=>
"c_"
+
idCpp
.
local
(
p
.
ident
)).
mkString
(
", "
)
val
callArgs
=
m
.
params
.
map
(
p
=>
"c_"
+
idCpp
.
local
(
p
.
ident
)).
mkString
(
", "
)
val
methodName
=
idCpp
.
method
(
m
.
ident
)
val
methodName
=
idCpp
.
method
(
m
.
ident
)
...
...
test-suite/generated-src/jni/NativeTestHelpers.cpp
View file @
cd05b91d
...
@@ -45,7 +45,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkSetRec
...
@@ -45,7 +45,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkSetRec
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
SetRecord
c_rec
=
NativeSetRecord
::
fromJava
(
jniEnv
,
j_rec
);
SetRecord
c_rec
=
NativeSetRecord
::
fromJava
(
jniEnv
,
j_rec
);
jniEnv
->
DeleteLocalRef
(
j_rec
);
bool
cr
=
TestHelpers
::
check_set_record
(
c_rec
);
bool
cr
=
TestHelpers
::
check_set_record
(
c_rec
);
...
@@ -69,7 +68,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkPrimit
...
@@ -69,7 +68,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkPrimit
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
PrimitiveList
c_pl
=
NativePrimitiveList
::
fromJava
(
jniEnv
,
j_pl
);
PrimitiveList
c_pl
=
NativePrimitiveList
::
fromJava
(
jniEnv
,
j_pl
);
jniEnv
->
DeleteLocalRef
(
j_pl
);
bool
cr
=
TestHelpers
::
check_primitive_list
(
c_pl
);
bool
cr
=
TestHelpers
::
check_primitive_list
(
c_pl
);
...
@@ -93,7 +91,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkNested
...
@@ -93,7 +91,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkNested
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
NestedCollection
c_nc
=
NativeNestedCollection
::
fromJava
(
jniEnv
,
j_nc
);
NestedCollection
c_nc
=
NativeNestedCollection
::
fromJava
(
jniEnv
,
j_nc
);
jniEnv
->
DeleteLocalRef
(
j_nc
);
bool
cr
=
TestHelpers
::
check_nested_collection
(
c_nc
);
bool
cr
=
TestHelpers
::
check_nested_collection
(
c_nc
);
...
@@ -117,7 +114,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkMap(JN
...
@@ -117,7 +114,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkMap(JN
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
unordered_map
<
std
::
string
,
int64_t
>
c_m
=
::
djinni
::
HMap
<::
djinni
::
HString
,
::
djinni
::
HI64
>::
fromJava
(
jniEnv
,
j_m
);
std
::
unordered_map
<
std
::
string
,
int64_t
>
c_m
=
::
djinni
::
HMap
<::
djinni
::
HString
,
::
djinni
::
HI64
>::
fromJava
(
jniEnv
,
j_m
);
jniEnv
->
DeleteLocalRef
(
j_m
);
bool
cr
=
TestHelpers
::
check_map
(
c_m
);
bool
cr
=
TestHelpers
::
check_map
(
c_m
);
...
@@ -141,7 +137,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkEmptyM
...
@@ -141,7 +137,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkEmptyM
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
unordered_map
<
std
::
string
,
int64_t
>
c_m
=
::
djinni
::
HMap
<::
djinni
::
HString
,
::
djinni
::
HI64
>::
fromJava
(
jniEnv
,
j_m
);
std
::
unordered_map
<
std
::
string
,
int64_t
>
c_m
=
::
djinni
::
HMap
<::
djinni
::
HString
,
::
djinni
::
HI64
>::
fromJava
(
jniEnv
,
j_m
);
jniEnv
->
DeleteLocalRef
(
j_m
);
bool
cr
=
TestHelpers
::
check_empty_map
(
c_m
);
bool
cr
=
TestHelpers
::
check_empty_map
(
c_m
);
...
@@ -165,7 +160,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkMapLis
...
@@ -165,7 +160,6 @@ CJNIEXPORT jboolean JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkMapLis
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
MapListRecord
c_m
=
NativeMapListRecord
::
fromJava
(
jniEnv
,
j_m
);
MapListRecord
c_m
=
NativeMapListRecord
::
fromJava
(
jniEnv
,
j_m
);
jniEnv
->
DeleteLocalRef
(
j_m
);
bool
cr
=
TestHelpers
::
check_map_list_record
(
c_m
);
bool
cr
=
TestHelpers
::
check_map_list_record
(
c_m
);
...
@@ -178,7 +172,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkClientInte
...
@@ -178,7 +172,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkClientInte
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
shared_ptr
<
ClientInterface
>
c_i
=
NativeClientInterface
::
fromJava
(
jniEnv
,
j_i
);
std
::
shared_ptr
<
ClientInterface
>
c_i
=
NativeClientInterface
::
fromJava
(
jniEnv
,
j_i
);
jniEnv
->
DeleteLocalRef
(
j_i
);
TestHelpers
::
check_client_interface_ascii
(
c_i
);
TestHelpers
::
check_client_interface_ascii
(
c_i
);
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
...
@@ -189,7 +182,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkClientInte
...
@@ -189,7 +182,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkClientInte
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
shared_ptr
<
ClientInterface
>
c_i
=
NativeClientInterface
::
fromJava
(
jniEnv
,
j_i
);
std
::
shared_ptr
<
ClientInterface
>
c_i
=
NativeClientInterface
::
fromJava
(
jniEnv
,
j_i
);
jniEnv
->
DeleteLocalRef
(
j_i
);
TestHelpers
::
check_client_interface_nonascii
(
c_i
);
TestHelpers
::
check_client_interface_nonascii
(
c_i
);
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
...
@@ -200,7 +192,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkEnumMap(JN
...
@@ -200,7 +192,6 @@ CJNIEXPORT void JNICALL Java_com_dropbox_djinni_test_TestHelpers_checkEnumMap(JN
try
{
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
unordered_map
<
color
,
std
::
string
>
c_m
=
::
djinni
::
HMap
<
NativeColor
,
::
djinni
::
HString
>::
fromJava
(
jniEnv
,
j_m
);
std
::
unordered_map
<
color
,
std
::
string
>
c_m
=
::
djinni
::
HMap
<
NativeColor
,
::
djinni
::
HString
>::
fromJava
(
jniEnv
,
j_m
);
jniEnv
->
DeleteLocalRef
(
j_m
);
TestHelpers
::
check_enum_map
(
c_m
);
TestHelpers
::
check_enum_map
(
c_m
);
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
)
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
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