June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -0,0 +1,3 @@
|
|||
p = ccall(:strdup, Ptr{Cuchar}, (Ptr{Cuchar},), "Hello world")
|
||||
@show unsafe_string(p) # "Hello world"
|
||||
ccall(:free, Void, (Ptr{Cuchar},), p)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
using PyCall
|
||||
@pyimport math
|
||||
@show math.cos(1) # 0.5403023058681398
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
julia> p = ccall(:strdup, Ptr{Uint8}, (Ptr{Uint8},), "Hello world")
|
||||
Ptr{Uint8} @0x000000011731bde0
|
||||
|
||||
julia> bytestring(p) # convert pointer back to a native Julia string
|
||||
"Hello world"
|
||||
|
||||
julia> ccall(:free, Void, (Ptr{Uint8},), p)
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
object JNIDemo {
|
||||
try System.loadLibrary("JNIDemo")
|
||||
|
||||
private def callStrdup(s: String)
|
||||
|
||||
println(callStrdup("Hello World!"))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue