ariovistus / pyd

Interoperability between Python and D
MIT License
158 stars 32 forks source link

Fixing wchar / wchar_t problems #112

Closed DannyArends closed 5 years ago

DannyArends commented 5 years ago

These two commits fix the wchar / wchar_t by importing the wchar_t from core.stdc.stddef

Fix for issue #111

DannyArends commented 5 years ago

The build is failing on:

// with char[], python_to_d probably isn't calling this function, but anyways
// char[]'s element type is dchar. Go figure.
assert(cantconvert(python_buffer_to_d!(char[])(a_ptr)));

I do not know exactly why the build is failing, since it doesn't provide the error (just the file and line number). I am guessing that this is since by using wchar_t it now is (correctly) allowing the conversion.

But I cannot be sure since I cannot reproduce the travis.ci build on my local machine.

ariovistus commented 5 years ago

to run the tests locally, I think all you really need to do is

python runtests.py runtests --clean
python setup.py install
python runtests.py runtests
DannyArends commented 5 years ago

I don't have python installed locally :D My project uses it in full embedded mode, since I do not want users of my program to have to install it.

DannyArends commented 5 years ago

Thanks again for the project ! If I run into any other issues I'll send more pull requests.

ariovistus commented 5 years ago

could you squash your changes?

DannyArends commented 5 years ago

I hope this is correct, I squashed the 4 commits together, it might be that the other (previous) pull request got into it as well. At least it is 1 commit now containing the updates for the wchar / wchar_t issue

DannyArends commented 5 years ago

OK, I squashed it wrongly before. Now it only contains 1 commit to fix the issue, and doesn't touch the dub.json file (for the other issue I submitted). Everything should be good to merge now.

Thanks for the project and your patience