Re: Call of C function breaks memoty layout

2020-01-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/24/20 9:58 AM, drug wrote: On 1/24/20 4:37 PM, Andrey wrote: Hello, I'm trying to bind C library for Tcl/Tk in D code. There is a function called "Tcl_CreateInterp()" which I declared as extent(C). When I call this function then layout of memory become broken - one of my global wstring

Re: Call of C function breaks memoty layout

2020-01-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/24/20 8:37 AM, Andrey wrote: Hello, I'm trying to bind C library for Tcl/Tk in D code. There is a function called "Tcl_CreateInterp()" which I declared as extent(C). When I call this function then layout of memory become broken - one of my global wstring variables loses it's value. I

Re: Call of C function breaks memoty layout

2020-01-24 Thread drug via Digitalmars-d-learn
On 1/24/20 4:37 PM, Andrey wrote: Hello, I'm trying to bind C library for Tcl/Tk in D code. There is a function called "Tcl_CreateInterp()" which I declared as extent(C). When I call this function then layout of memory become broken - one of my global wstring variables loses it's value. I

Re: Call of C function breaks memoty layout

2020-01-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/24/20 8:37 AM, Andrey wrote: Hello, I'm trying to bind C library for Tcl/Tk in D code. There is a function called "Tcl_CreateInterp()" which I declared as extent(C). When I call this function then layout of memory become broken - one of my global wstring variables loses it's value. I

Call of C function breaks memoty layout

2020-01-24 Thread Andrey via Digitalmars-d-learn
Hello, I'm trying to bind C library for Tcl/Tk in D code. There is a function called "Tcl_CreateInterp()" which I declared as extent(C). When I call this function then layout of memory become broken - one of my global wstring variables loses it's value. I don't know why it is happens. If I