Workaround Issue 17081 - Bodies in extern cpp functions in D files are not linked#1736
Workaround Issue 17081 - Bodies in extern cpp functions in D files are not linked#1736andralex merged 1 commit intodlang:masterfrom
Conversation
|
Why do you implement these functions? Isn't adding the |
|
@kinke adding |
7047407 to
59799b3
Compare
|
From the bug tracker:
Before rushing in a fix, it is important to figure out what is going wrong here. Linking against non-virtual C++ function is supposed to work (unless, of course, they are static/inline on the C++ side). Comparing the mangled name would be a first step. |
andralex
left a comment
There was a problem hiding this comment.
Before rushing in a fix, it is important to figure out what is going wrong here.
This is a fine workaround. We'll end up implementing a few functions on the C++ side for inlining purposes anyway.
src/core/stdcpp/typeinfo.d
Outdated
| return _name[0] == '*' ? _name + 1 : _name; | ||
| } | ||
| final bool before()(const type_info _arg) const { | ||
| import core.stdc.string:strcmp; |
src/core/stdcpp/typeinfo.d
Outdated
| import core.stdc.string:strcmp; | ||
| return (_name[0] == '*' && _arg._name[0] == '*') | ||
| ? _name < _arg._name | ||
| : strcmp (_name, _arg._name) < 0; |
There was a problem hiding this comment.
no space before ( in function call (i.e. use math-like notation), cc @wilzbach
|
BTW this shall not be considered a fix, so I'll change the title. |
59799b3 to
d4f4560
Compare
|
@andralex Fixed spacing, waiting final tests for merge |
|
Auto-merge toggled on |
|
@Darredevil great, thx. Next step would be probably to actually see the problem with https://issues.dlang.org/show_bug.cgi?id=17081. Also please push this again, looks like the autotester failed for no cause. cc @MartinNowak @braddr |
https://issues.dlang.org/show_bug.cgi?id=17081