Problem with interfacing C code to D
Artur Skawina
art.08.09 at gmail.com
Mon Jan 9 17:06:52 PST 2012
On 01/10/12 01:02, bioinfornatics wrote:
> Dear i do not understand why the first example works and the second
> segfault. Thanks
>
> ----------------EXAMPLE 1 -------------------
Display* display = XOpenDisplay(getenv("DISPLAY"));
> char** fonts = XListFonts( display, pattern.dup.ptr, 10, &counter
> ----------------EXAMPLE 2 -------------------
> Display display = *XOpenDisplay(getenv("DISPLAY"));
> char** fonts = XListFonts( &display, pattern.dup.ptr, 10, &counter
Do you expect the xlib functions to work with copies of private structures?
artur
More information about the Digitalmars-d-learn
mailing list