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
0521e806
Commit
0521e806
authored
Jul 02, 2015
by
Miro Knejp
Committed by
Jacob Potter
Jul 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix name clashes between parameters and locals in +o+j
fixes #105
parent
1af60e92
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
61 additions
and
16 deletions
+61
-16
example/generated-src/jni/NativeTextboxListener.cpp
example/generated-src/jni/NativeTextboxListener.cpp
+2
-2
example/generated-src/objc/TXSTextboxListener+Private.mm
example/generated-src/objc/TXSTextboxListener+Private.mm
+2
-2
src/source/JNIGenerator.scala
src/source/JNIGenerator.scala
+2
-2
src/source/ObjcppGenerator.scala
src/source/ObjcppGenerator.scala
+2
-2
test-suite/djinni/client_interface.djinni
test-suite/djinni/client_interface.djinni
+1
-0
test-suite/generated-src/cpp/client_interface.hpp
test-suite/generated-src/cpp/client_interface.hpp
+3
-0
test-suite/generated-src/java/com/dropbox/djinni/test/ClientInterface.java
...ted-src/java/com/dropbox/djinni/test/ClientInterface.java
+2
-0
test-suite/generated-src/jni/NativeClientInterface.cpp
test-suite/generated-src/jni/NativeClientInterface.cpp
+15
-4
test-suite/generated-src/jni/NativeClientInterface.hpp
test-suite/generated-src/jni/NativeClientInterface.hpp
+2
-0
test-suite/generated-src/objc/DBClientInterface+Private.mm
test-suite/generated-src/objc/DBClientInterface+Private.mm
+13
-4
test-suite/generated-src/objc/DBClientInterface.h
test-suite/generated-src/objc/DBClientInterface.h
+4
-0
test-suite/handwritten-src/java/com/dropbox/djinni/test/ClientInterfaceImpl.java
...src/java/com/dropbox/djinni/test/ClientInterfaceImpl.java
+5
-0
test-suite/handwritten-src/objc/impl/DBClientInterfaceImpl.mm
...-suite/handwritten-src/objc/impl/DBClientInterfaceImpl.mm
+8
-0
No files found.
example/generated-src/jni/NativeTextboxListener.cpp
View file @
0521e806
...
@@ -14,12 +14,12 @@ NativeTextboxListener::JavaProxy::JavaProxy(JniType j) : JavaProxyCacheEntry(j)
...
@@ -14,12 +14,12 @@ NativeTextboxListener::JavaProxy::JavaProxy(JniType j) : JavaProxyCacheEntry(j)
NativeTextboxListener
::
JavaProxy
::~
JavaProxy
()
=
default
;
NativeTextboxListener
::
JavaProxy
::~
JavaProxy
()
=
default
;
void
NativeTextboxListener
::
JavaProxy
::
update
(
const
::
textsort
::
ItemList
&
items
)
{
void
NativeTextboxListener
::
JavaProxy
::
update
(
const
::
textsort
::
ItemList
&
c_
items
)
{
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
const
auto
&
data
=
::
djinni
::
JniClass
<::
djinni_generated
::
NativeTextboxListener
>::
get
();
const
auto
&
data
=
::
djinni
::
JniClass
<::
djinni_generated
::
NativeTextboxListener
>::
get
();
jniEnv
->
CallVoidMethod
(
getGlobalRef
(),
data
.
method_update
,
jniEnv
->
CallVoidMethod
(
getGlobalRef
(),
data
.
method_update
,
::
djinni
::
get
(
::
djinni_generated
::
NativeItemList
::
fromCpp
(
jniEnv
,
items
)));
::
djinni
::
get
(
::
djinni_generated
::
NativeItemList
::
fromCpp
(
jniEnv
,
c_
items
)));
::
djinni
::
jniExceptionCheck
(
jniEnv
);
::
djinni
::
jniExceptionCheck
(
jniEnv
);
}
}
...
...
example/generated-src/objc/TXSTextboxListener+Private.mm
View file @
0521e806
...
@@ -16,10 +16,10 @@ class TextboxListener::ObjcProxy final
...
@@ -16,10 +16,10 @@ class TextboxListener::ObjcProxy final
{
{
public:
public:
using
Handle
::
Handle
;
using
Handle
::
Handle
;
void
update
(
const
::
textsort
::
ItemList
&
items
)
override
void
update
(
const
::
textsort
::
ItemList
&
c_
items
)
override
{
{
@autoreleasepool
{
@autoreleasepool
{
[(
ObjcType
)
Handle
:
:
get
()
update
:(
::
djinni_generated
::
ItemList
::
fromCpp
(
items
))];
[(
ObjcType
)
Handle
:
:
get
()
update
:(
::
djinni_generated
::
ItemList
::
fromCpp
(
c_
items
))];
}
}
}
}
};
};
...
...
src/source/JNIGenerator.scala
View file @
0521e806
...
@@ -248,7 +248,7 @@ class JNIGenerator(spec: Spec) extends Generator(spec) {
...
@@ -248,7 +248,7 @@ class JNIGenerator(spec: Spec) extends Generator(spec) {
w
.
wl
w
.
wl
for
(
m
<-
i
.
methods
)
{
for
(
m
<-
i
.
methods
)
{
val
ret
=
cppMarshal
.
fqReturnType
(
m
.
ret
)
val
ret
=
cppMarshal
.
fqReturnType
(
m
.
ret
)
val
params
=
m
.
params
.
map
(
p
=>
cppMarshal
.
fqParamType
(
p
.
ty
)
+
" "
+
idCpp
.
local
(
p
.
ident
))
val
params
=
m
.
params
.
map
(
p
=>
cppMarshal
.
fqParamType
(
p
.
ty
)
+
"
c_
"
+
idCpp
.
local
(
p
.
ident
))
writeJniTypeParams
(
w
,
typeParams
)
writeJniTypeParams
(
w
,
typeParams
)
w
.
w
(
s
"$ret $jniSelfWithParams::JavaProxy::${idCpp.method(m.ident)}${params.mkString("
(
", "
,
", "
)
")}"
).
braced
{
w
.
w
(
s
"$ret $jniSelfWithParams::JavaProxy::${idCpp.method(m.ident)}${params.mkString("
(
", "
,
", "
)
")}"
).
braced
{
w
.
wl
(
s
"auto jniEnv = ::djinni::jniGetThreadEnv();"
)
w
.
wl
(
s
"auto jniEnv = ::djinni::jniGetThreadEnv();"
)
...
@@ -261,7 +261,7 @@ class JNIGenerator(spec: Spec) extends Generator(spec) {
...
@@ -261,7 +261,7 @@ class JNIGenerator(spec: Spec) extends Generator(spec) {
if
(!
m
.
params
.
isEmpty
){
if
(!
m
.
params
.
isEmpty
){
w
.
wl
(
","
)
w
.
wl
(
","
)
writeAlignedCall
(
w
,
" "
*
call
.
length
(),
m
.
params
,
")"
,
p
=>
{
writeAlignedCall
(
w
,
" "
*
call
.
length
(),
m
.
params
,
")"
,
p
=>
{
val
param
=
jniMarshal
.
fromCpp
(
p
.
ty
,
idCpp
.
local
(
p
.
ident
))
val
param
=
jniMarshal
.
fromCpp
(
p
.
ty
,
"c_"
+
idCpp
.
local
(
p
.
ident
))
s
"::djinni::get($param)"
s
"::djinni::get($param)"
})
})
}
}
...
...
src/source/ObjcppGenerator.scala
View file @
0521e806
...
@@ -174,12 +174,12 @@ class ObjcppGenerator(spec: Spec) extends Generator(spec) {
...
@@ -174,12 +174,12 @@ class ObjcppGenerator(spec: Spec) extends Generator(spec) {
w
.
wl
(
"using Handle::Handle;"
)
w
.
wl
(
"using Handle::Handle;"
)
for
(
m
<-
i
.
methods
)
{
for
(
m
<-
i
.
methods
)
{
val
ret
=
cppMarshal
.
fqReturnType
(
m
.
ret
)
val
ret
=
cppMarshal
.
fqReturnType
(
m
.
ret
)
val
params
=
m
.
params
.
map
(
p
=>
cppMarshal
.
fqParamType
(
p
.
ty
)
+
" "
+
idCpp
.
local
(
p
.
ident
))
val
params
=
m
.
params
.
map
(
p
=>
cppMarshal
.
fqParamType
(
p
.
ty
)
+
"
c_
"
+
idCpp
.
local
(
p
.
ident
))
w
.
wl
(
s
"$ret ${idCpp.method(m.ident)}${params.mkString("
(
", "
,
", "
)
")} override"
).
braced
{
w
.
wl
(
s
"$ret ${idCpp.method(m.ident)}${params.mkString("
(
", "
,
", "
)
")} override"
).
braced
{
w
.
w
(
"@autoreleasepool"
).
braced
{
w
.
w
(
"@autoreleasepool"
).
braced
{
val
ret
=
m
.
ret
.
fold
(
""
)(
_
=>
"auto r = "
)
val
ret
=
m
.
ret
.
fold
(
""
)(
_
=>
"auto r = "
)
val
call
=
s
"[(ObjcType)Handle::get() ${idObjc.method(m.ident)}"
val
call
=
s
"[(ObjcType)Handle::get() ${idObjc.method(m.ident)}"
writeAlignedObjcCall
(
w
,
ret
+
call
,
m
.
params
,
"]"
,
p
=>
(
idObjc
.
field
(
p
.
ident
),
s
"(${objcppMarshal.fromCpp(p.ty, idCpp.local(p.ident))})"
))
writeAlignedObjcCall
(
w
,
ret
+
call
,
m
.
params
,
"]"
,
p
=>
(
idObjc
.
field
(
p
.
ident
),
s
"(${objcppMarshal.fromCpp(p.ty,
"
c_
" +
idCpp.local(p.ident))})"
))
w
.
wl
(
";"
)
w
.
wl
(
";"
)
m
.
ret
.
fold
()(
r
=>
{
w
.
wl
(
s
"return ${objcppMarshal.toCpp(r, "
r
")};"
)
})
m
.
ret
.
fold
()(
r
=>
{
w
.
wl
(
s
"return ${objcppMarshal.toCpp(r, "
r
")};"
)
})
}
}
...
...
test-suite/djinni/client_interface.djinni
View file @
0521e806
...
@@ -7,5 +7,6 @@ client_returned_record = record {
...
@@ -7,5 +7,6 @@ client_returned_record = record {
client_interface = interface +j +o {
client_interface = interface +j +o {
# Returns record of given string
# Returns record of given string
get_record(record_id: i64, utf8string: string, misc: optional<string>): client_returned_record;
get_record(record_id: i64, utf8string: string, misc: optional<string>): client_returned_record;
identifier_check(data: binary, r: i32, jret: i64): f64;
return_str(): string;
return_str(): string;
}
}
test-suite/generated-src/cpp/client_interface.hpp
View file @
0521e806
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#include <cstdint>
#include <cstdint>
#include <experimental/optional>
#include <experimental/optional>
#include <string>
#include <string>
#include <vector>
class
ClientInterface
{
class
ClientInterface
{
public:
public:
...
@@ -15,5 +16,7 @@ public:
...
@@ -15,5 +16,7 @@ public:
/** Returns record of given string */
/** Returns record of given string */
virtual
ClientReturnedRecord
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
=
0
;
virtual
ClientReturnedRecord
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
=
0
;
virtual
double
identifier_check
(
const
std
::
vector
<
uint8_t
>
&
data
,
int32_t
r
,
int64_t
jret
)
=
0
;
virtual
std
::
string
return_str
()
=
0
;
virtual
std
::
string
return_str
()
=
0
;
};
};
test-suite/generated-src/java/com/dropbox/djinni/test/ClientInterface.java
View file @
0521e806
...
@@ -11,6 +11,8 @@ public abstract class ClientInterface {
...
@@ -11,6 +11,8 @@ public abstract class ClientInterface {
@Nonnull
@Nonnull
public
abstract
ClientReturnedRecord
getRecord
(
long
recordId
,
@Nonnull
String
utf8string
,
@CheckForNull
String
misc
);
public
abstract
ClientReturnedRecord
getRecord
(
long
recordId
,
@Nonnull
String
utf8string
,
@CheckForNull
String
misc
);
public
abstract
double
identifierCheck
(
@Nonnull
byte
[]
data
,
int
r
,
long
jret
);
@Nonnull
@Nonnull
public
abstract
String
returnStr
();
public
abstract
String
returnStr
();
}
}
test-suite/generated-src/jni/NativeClientInterface.cpp
View file @
0521e806
...
@@ -15,17 +15,28 @@ NativeClientInterface::JavaProxy::JavaProxy(JniType j) : JavaProxyCacheEntry(j)
...
@@ -15,17 +15,28 @@ NativeClientInterface::JavaProxy::JavaProxy(JniType j) : JavaProxyCacheEntry(j)
NativeClientInterface
::
JavaProxy
::~
JavaProxy
()
=
default
;
NativeClientInterface
::
JavaProxy
::~
JavaProxy
()
=
default
;
::
ClientReturnedRecord
NativeClientInterface
::
JavaProxy
::
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
{
::
ClientReturnedRecord
NativeClientInterface
::
JavaProxy
::
get_record
(
int64_t
c_record_id
,
const
std
::
string
&
c_utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
c_
misc
)
{
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
const
auto
&
data
=
::
djinni
::
JniClass
<::
djinni_generated
::
NativeClientInterface
>::
get
();
const
auto
&
data
=
::
djinni
::
JniClass
<::
djinni_generated
::
NativeClientInterface
>::
get
();
auto
jret
=
jniEnv
->
CallObjectMethod
(
getGlobalRef
(),
data
.
method_getRecord
,
auto
jret
=
jniEnv
->
CallObjectMethod
(
getGlobalRef
(),
data
.
method_getRecord
,
::
djinni
::
get
(
::
djinni
::
I64
::
fromCpp
(
jniEnv
,
record_id
)),
::
djinni
::
get
(
::
djinni
::
I64
::
fromCpp
(
jniEnv
,
c_
record_id
)),
::
djinni
::
get
(
::
djinni
::
String
::
fromCpp
(
jniEnv
,
utf8string
)),
::
djinni
::
get
(
::
djinni
::
String
::
fromCpp
(
jniEnv
,
c_
utf8string
)),
::
djinni
::
get
(
::
djinni
::
Optional
<
std
::
experimental
::
optional
,
::
djinni
::
String
>::
fromCpp
(
jniEnv
,
misc
)));
::
djinni
::
get
(
::
djinni
::
Optional
<
std
::
experimental
::
optional
,
::
djinni
::
String
>::
fromCpp
(
jniEnv
,
c_
misc
)));
::
djinni
::
jniExceptionCheck
(
jniEnv
);
::
djinni
::
jniExceptionCheck
(
jniEnv
);
return
::
djinni_generated
::
NativeClientReturnedRecord
::
toCpp
(
jniEnv
,
jret
);
return
::
djinni_generated
::
NativeClientReturnedRecord
::
toCpp
(
jniEnv
,
jret
);
}
}
double
NativeClientInterface
::
JavaProxy
::
identifier_check
(
const
std
::
vector
<
uint8_t
>
&
c_data
,
int32_t
c_r
,
int64_t
c_jret
)
{
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
const
auto
&
data
=
::
djinni
::
JniClass
<::
djinni_generated
::
NativeClientInterface
>::
get
();
auto
jret
=
jniEnv
->
CallDoubleMethod
(
getGlobalRef
(),
data
.
method_identifierCheck
,
::
djinni
::
get
(
::
djinni
::
Binary
::
fromCpp
(
jniEnv
,
c_data
)),
::
djinni
::
get
(
::
djinni
::
I32
::
fromCpp
(
jniEnv
,
c_r
)),
::
djinni
::
get
(
::
djinni
::
I64
::
fromCpp
(
jniEnv
,
c_jret
)));
::
djinni
::
jniExceptionCheck
(
jniEnv
);
return
::
djinni
::
F64
::
toCpp
(
jniEnv
,
jret
);
}
std
::
string
NativeClientInterface
::
JavaProxy
::
return_str
()
{
std
::
string
NativeClientInterface
::
JavaProxy
::
return_str
()
{
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
auto
jniEnv
=
::
djinni
::
jniGetThreadEnv
();
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
::
djinni
::
JniLocalScope
jscope
(
jniEnv
,
10
);
...
...
test-suite/generated-src/jni/NativeClientInterface.hpp
View file @
0521e806
...
@@ -32,6 +32,7 @@ private:
...
@@ -32,6 +32,7 @@ private:
~
JavaProxy
();
~
JavaProxy
();
::
ClientReturnedRecord
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
override
;
::
ClientReturnedRecord
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
override
;
double
identifier_check
(
const
std
::
vector
<
uint8_t
>
&
data
,
int32_t
r
,
int64_t
jret
)
override
;
std
::
string
return_str
()
override
;
std
::
string
return_str
()
override
;
private:
private:
...
@@ -42,6 +43,7 @@ private:
...
@@ -42,6 +43,7 @@ private:
const
::
djinni
::
GlobalRef
<
jclass
>
clazz
{
::
djinni
::
jniFindClass
(
"com/dropbox/djinni/test/ClientInterface"
)
};
const
::
djinni
::
GlobalRef
<
jclass
>
clazz
{
::
djinni
::
jniFindClass
(
"com/dropbox/djinni/test/ClientInterface"
)
};
const
jmethodID
method_getRecord
{
::
djinni
::
jniGetMethodID
(
clazz
.
get
(),
"getRecord"
,
"(JLjava/lang/String;Ljava/lang/String;)Lcom/dropbox/djinni/test/ClientReturnedRecord;"
)
};
const
jmethodID
method_getRecord
{
::
djinni
::
jniGetMethodID
(
clazz
.
get
(),
"getRecord"
,
"(JLjava/lang/String;Ljava/lang/String;)Lcom/dropbox/djinni/test/ClientReturnedRecord;"
)
};
const
jmethodID
method_identifierCheck
{
::
djinni
::
jniGetMethodID
(
clazz
.
get
(),
"identifierCheck"
,
"([BIJ)D"
)
};
const
jmethodID
method_returnStr
{
::
djinni
::
jniGetMethodID
(
clazz
.
get
(),
"returnStr"
,
"()Ljava/lang/String;"
)
};
const
jmethodID
method_returnStr
{
::
djinni
::
jniGetMethodID
(
clazz
.
get
(),
"returnStr"
,
"()Ljava/lang/String;"
)
};
};
};
...
...
test-suite/generated-src/objc/DBClientInterface+Private.mm
View file @
0521e806
...
@@ -17,15 +17,24 @@ class ClientInterface::ObjcProxy final
...
@@ -17,15 +17,24 @@ class ClientInterface::ObjcProxy final
{
{
public:
public:
using
Handle
::
Handle
;
using
Handle
::
Handle
;
::
ClientReturnedRecord
get_record
(
int64_t
record_id
,
const
std
::
string
&
utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
misc
)
override
::
ClientReturnedRecord
get_record
(
int64_t
c_record_id
,
const
std
::
string
&
c_utf8string
,
const
std
::
experimental
::
optional
<
std
::
string
>
&
c_
misc
)
override
{
{
@autoreleasepool
{
@autoreleasepool
{
auto
r
=
[(
ObjcType
)
Handle
:
:
get
()
getRecord
:(
::
djinni
::
I64
::
fromCpp
(
record_id
))
auto
r
=
[(
ObjcType
)
Handle
:
:
get
()
getRecord
:(
::
djinni
::
I64
::
fromCpp
(
c_
record_id
))
utf8string:
(
::
djinni
::
String
::
fromCpp
(
utf8string
))
utf8string:
(
::
djinni
::
String
::
fromCpp
(
c_
utf8string
))
misc:
(
::
djinni
::
Optional
<
std
::
experimental
::
optional
,
::
djinni
::
String
>::
fromCpp
(
misc
))];
misc:
(
::
djinni
::
Optional
<
std
::
experimental
::
optional
,
::
djinni
::
String
>::
fromCpp
(
c_
misc
))];
return
::
djinni_generated
::
ClientReturnedRecord
::
toCpp
(
r
);
return
::
djinni_generated
::
ClientReturnedRecord
::
toCpp
(
r
);
}
}
}
}
double
identifier_check
(
const
std
::
vector
<
uint8_t
>
&
c_data
,
int32_t
c_r
,
int64_t
c_jret
)
override
{
@autoreleasepool
{
auto
r
=
[(
ObjcType
)
Handle
:
:
get
()
identifierCheck
:(
::
djinni
::
Binary
::
fromCpp
(
c_data
))
r:
(
::
djinni
::
I32
::
fromCpp
(
c_r
))
jret:
(
::
djinni
::
I64
::
fromCpp
(
c_jret
))];
return
::
djinni
::
F64
::
toCpp
(
r
);
}
}
std
::
string
return_str
()
override
std
::
string
return_str
()
override
{
{
@autoreleasepool
{
@autoreleasepool
{
...
...
test-suite/generated-src/objc/DBClientInterface.h
View file @
0521e806
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
utf8string
:(
nonnull
NSString
*
)
utf8string
utf8string
:(
nonnull
NSString
*
)
utf8string
misc
:(
nullable
NSString
*
)
misc
;
misc
:(
nullable
NSString
*
)
misc
;
-
(
double
)
identifierCheck
:(
nonnull
NSData
*
)
data
r
:(
int32_t
)
r
jret
:(
int64_t
)
jret
;
-
(
nonnull
NSString
*
)
returnStr
;
-
(
nonnull
NSString
*
)
returnStr
;
@end
@end
test-suite/handwritten-src/java/com/dropbox/djinni/test/ClientInterfaceImpl.java
View file @
0521e806
...
@@ -8,6 +8,11 @@ public class ClientInterfaceImpl extends ClientInterface {
...
@@ -8,6 +8,11 @@ public class ClientInterfaceImpl extends ClientInterface {
}
}
return
new
ClientReturnedRecord
(
id
,
utf8string
,
misc
);
return
new
ClientReturnedRecord
(
id
,
utf8string
,
misc
);
}
}
@Override
public
double
identifierCheck
(
byte
[]
data
,
int
r
,
long
jret
)
{
return
0.0
;
}
@Override
@Override
public
String
returnStr
()
{
public
String
returnStr
()
{
return
"test"
;
return
"test"
;
...
...
test-suite/handwritten-src/objc/impl/DBClientInterfaceImpl.mm
View file @
0521e806
...
@@ -12,6 +12,14 @@ static NSString *DBNonAscii = @"Non-ASCII / 非 ASCII 字符";
...
@@ -12,6 +12,14 @@ static NSString *DBNonAscii = @"Non-ASCII / 非 ASCII 字符";
return
[[
DBClientReturnedRecord
alloc
]
initWithRecordId
:
ident
content
:
utf8string
misc
:
misc
];
return
[[
DBClientReturnedRecord
alloc
]
initWithRecordId
:
ident
content
:
utf8string
misc
:
misc
];
}
}
-
(
double
)
identifierCheck
:(
nonnull
NSData
*
)
data
r
:(
int32_t
)
r
jret
:(
int64_t
)
jret
{
(
void
)
data
;
(
void
)
r
;
(
void
)
jret
;
return
0.0
;
}
-
(
NSString
*
)
returnStr
-
(
NSString
*
)
returnStr
{
{
return
@"test"
;
return
@"test"
;
...
...
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