Function not registered when `DictionaryServices.bridgesupport` parsed.
afaur opened this issue · comments
I am trying to use the DCSCopyTextDefinition
function from DictionaryServices
(a part of the CoreServices
framework) however it does not get registered by NodObjC
. The only way I was able to get NodObjC
to register this function is by pointing the .bridgesupport
file to my own copy which I modified by copying the xml for the function and putting it in the file twice.
...
<function name='DCSCopyTextDefinition'>
<arg type='^{__DCSDictionary=}'/>
<arg type='^{__CFString=}'/>
<arg type='{_CFRange=ii}' type64='{_CFRange=qq}'/>
<retval already_retained='true' type='^{__CFString=}'/>
</function>
<function name='DCSCopyTextDefinition'>
<arg type='^{__DCSDictionary=}'/>
<arg type='^{__CFString=}'/>
<arg type='{_CFRange=ii}' type64='{_CFRange=qq}'/>
<retval already_retained='true' type='^{__CFString=}'/>
</function>
...
This allowed the function to be added to NodObjC
after requiring CoreServices
This makes me believe that a problem might exist with the findTags
function here
(https://github.com/TooTallNate/NodObjC/blob/master/lib/import.js#L97)
After getting NodObjC
to recognize the method I tried using it and got a
segfault and I am having trouble debugging this further.
I have created a repo to recreate the issue I am having which is located here:
https://github.com/afaur/issue-test-nodobjc