June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -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)

View file

@ -0,0 +1,3 @@
using PyCall
@pyimport math
@show math.cos(1) # 0.5403023058681398

View file

@ -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)

View file

@ -0,0 +1,7 @@
object JNIDemo {
try System.loadLibrary("JNIDemo")
private def callStrdup(s: String)
println(callStrdup("Hello World!"))
}