Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warnings #48

Closed
samoconnor opened this issue Jul 2, 2016 · 1 comment
Closed

Deprecation warnings #48

samoconnor opened this issue Jul 2, 2016 · 1 comment

Comments

@samoconnor
Copy link
Contributor

Fix for pointer_to_array deprecation.

diff --git a/src/ctr_drbg.jl b/src/ctr_drbg.jl
index 14b46a8..e279e11 100644
--- a/src/ctr_drbg.jl
+++ b/src/ctr_drbg.jl
@@ -20,7 +20,7 @@ end

 function f_rng(c_ctx, c_buf, sz)
     jl_ctx = unsafe_pointer_to_objref(c_ctx)
-    jl_buf = pointer_to_array(c_buf, sz, false)
+    jl_buf = unsafe_wrap(Array, c_buf, sz, false)
     rand!(jl_ctx, jl_buf)
     MBED_SUCCESS
 end
diff --git a/src/ssl.jl b/src/ssl.jl
index 0ae7be6..08dea7d 100644
--- a/src/ssl.jl
+++ b/src/ssl.jl
@@ -92,13 +92,13 @@ end

 function f_send(c_ctx, c_msg, sz)
     jl_ctx = unsafe_pointer_to_objref(c_ctx)
-    jl_msg = pointer_to_array(c_msg, sz, false)
+    jl_msg = unsafe_wrap(Array, c_msg, sz, false)
     return Cint(write(jl_ctx, jl_msg))
 end

 function f_recv(c_ctx, c_msg, sz)
     jl_ctx = unsafe_pointer_to_objref(c_ctx)
-    jl_msg = pointer_to_array(c_msg, sz, false)
+    jl_msg = unsafe_wrap(Array, c_msg, sz, false)
     n = readbytes!(jl_ctx, jl_msg, sz)
     return Cint(n)
 end
@yuyichao
Copy link
Contributor

yuyichao commented Jul 3, 2016

Need to bump Compat version. Also please use a PR instead to run through the CI

@yuyichao yuyichao closed this as completed Jul 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants