Append ref qualifier to signed-as type on 'this'#20
Conversation
|
Can you drop a link to the header with the offending C++ functions? I would like to have a look what libtorch does. |
|
Here are some examples. There are others. |
|
Hm-m. I was pretty sure I've added support for these kinds, because I've had similar issues in the libraries I'd wrapped. I'll have another look. |
|
Like these |
|
C++ methods with different signatures should have had different mangled names and that should have guaranteed unique |
|
The mangled names were different, but the Lisp names were the same. The |
|
Oh, when SBCL says "duplicate definition" it doesn't mean the two |
|
Output from the first link above, before my change (ignore the slight discrepancy in line numbers): After the change: |
This PR goes with libresect #13 and cl-resect #1.
The problem was that I was getting duplicate-definition errors from SBCL (well, it calls them warnings, but then it aborts compilation) on
operator=methods. The cause turned out to be that some pairs of these in libtorch were distinguished only by ref qualifiers, which Claw was not capturing. So theniffi:defifunwould emitdefuns for both of them, causing the error.I have arranged for the qualifier to appear in the
:signed-astype for thethisparameter.