Registering a descriptor with moving GC is not enough, you should
also fix the pointer so that it's not moved.
The better way would be to interact through a COM interface,
which would abstract tricks of the library code. Advanced
environments are usually able to generate such interface.
On Monday, 28 July 2014 at 21:33:54 UTC, Rene Zwanenburg wrote:
If I understand you correctly, an easy way is to use RefCounted
with a simple wrapper. Something like this:
// Descriptor defined by the external library
struct DescriptorImpl
{
size_t type;
void* data;
}
// Tiny wrapper
On Monday, 28 July 2014 at 20:52:01 UTC, Anton wrote:
On Monday, 28 July 2014 at 19:57:38 UTC, Carl Sturtivant wrote:
Suppose I want to use D as a system programming language to
work with a library of functions written in another language,
operating on dynamically typed data that has its own
Suppose I want to use D as a system programming language to work
with a library of functions written in another language,
operating on dynamically typed data that has its own garbage
collector, such as an algebra system or the virtual machine of a
dynamically typed scripting language viewed as
On Monday, 28 July 2014 at 19:57:38 UTC, Carl Sturtivant wrote:
Suppose I want to use D as a system programming language to
work with a library of functions written in another language,
operating on dynamically typed data that has its own garbage
collector, such as an algebra system or the
On Monday, 28 July 2014 at 19:57:38 UTC, Carl Sturtivant wrote:
Suppose I want to use D as a system programming language to
work with a library of functions written in another language,
operating on dynamically typed data that has its own garbage
collector, such as an algebra system or the