Skip to content

Commit

Permalink
calling-c: elaborate on the x_dpy example
Browse files Browse the repository at this point in the history
The following code is not valid Pony code

    let x_dpy = @XOpenDisplay(Pointer[U8])
  • Loading branch information
greenfork committed Dec 29, 2023
1 parent ad98266 commit 39d72a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/c-ffi/calling-c.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ use @eglGetDisplay[Pointer[_EGLDisplayHandle]](disp: Pointer[_XDisplayHandle])
primitive _XDisplayHandle
primitive _EGLDisplayHandle
let x_dpy = @XOpenDisplay(Pointer[U8])
let x_dpy_name: String = // ...
let x_dpy = @XOpenDisplay(x_dpy_name.cstring())
if x_dpy.is_null() then
env.out.print("XOpenDisplay failed")
end
Expand Down

0 comments on commit 39d72a3

Please sign in to comment.