symmetryinvestments / clrbridge Goto Github PK
View Code? Open in Web Editor NEWCall .NET code from other languages
License: Boost Software License 1.0
Call .NET code from other languages
License: Boost Software License 1.0
The tryArrayBuilderFinish
functions in clrbridge/package.d
are causing a segfault in LDC. I've filed an issue here: ldc-developers/ldc#3314
When trying to execute the step rund example.d
while building the project with command rund minish.d cleanBuildAll
, tons of error spawned saying Error 1: Previous Definition Different {Mangled Name Here}.
After reading the codegen source code. I found that currently clrbridge lacks of a way to handle different overloads with only non-primitive parameters have different type.
For example, for Marshal.ReadInt64, both of its two-parameter overloads become ReadInt64(__d.clr.DotNetObject, int)
. Thus a case of the above mentioned Error 1 occurred.
Could there be a way to identify and fix this issue?
A possible way to solve this is to generate DotNetObject_IntPtr for C# IntPtr, DotNetObject_Object for C# Object and alias this each of these DotNetObject_??? to DotNetObject so that the line __d.globalClrBridge.box!"Object"
could leave unchanged.
e.g.:
ReadInt64(IntPtr, Int32)
-> ReadInt64(__d.clr.DotNetObject_IntPtr, int)
ReadInt64(Object, Int32)
-> ReadInt64(__d.clr.DotNetObject_Object, int)
Also worth mentioning, as you may know, not everything in C# derives from object. So, although I haven't tested this by myself, try calling some String Constructors (and other methods with pointer-type or TypedReference parameters) may cause error or unexpected behaviour, thus need to be excluded from codegen procedure.
PS. may I ask what license is applied to this project?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.