Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix write-strings warning on python < 3.7 #195

Merged
merged 3 commits into from Aug 12, 2019

Conversation

@peterbell10
Copy link
Collaborator

peterbell10 commented Aug 11, 2019

Fixes a compiler warning specific to python < 3.7:

uarray/_uarray_dispatch.cxx:896:1: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]

Copy link
Contributor

hameerabbasi left a comment

One minor query.

@@ -889,9 +889,11 @@ int Function::clear(Function * self)
}


// getset takes mutable char * in python < 3.7
static char dict__[] = "__dict__";

This comment has been minimized.

Copy link
@hameerabbasi

hameerabbasi Aug 11, 2019

Contributor

Is it possible to squeeze a const somewhere in here?

This comment has been minimized.

Copy link
@peterbell10

peterbell10 Aug 11, 2019

Author Collaborator

If the buffer was const then the pointer would have to be const char * and it wouldn't work.

@peterbell10 peterbell10 reopened this Aug 11, 2019
@peterbell10

This comment has been minimized.

Copy link
Collaborator Author

peterbell10 commented Aug 11, 2019

Any idea what's going on with the CI failure?

@hameerabbasi

This comment has been minimized.

Copy link
Contributor

hameerabbasi commented Aug 12, 2019

@peterbell10 peterbell10 force-pushed the string-warning branch 6 times, most recently from a59010f to 02922d7 Aug 12, 2019
@larsoner

This comment has been minimized.

Copy link

larsoner commented Aug 12, 2019

It's probably conda/conda#9084, in which case changing this:

https://github.com/Quansight-Labs/uarray/blob/master/.conda/environment3.7.yml

To be 3.7.3 or 3.7,!=3.7.4 (not sure about this syntax?) or something similar might work around it.

@peterbell10

This comment has been minimized.

Copy link
Collaborator Author

peterbell10 commented Aug 12, 2019

Thanks @larsoner, that was the issue.

@peterbell10 peterbell10 merged commit a864a57 into master Aug 12, 2019
2 checks passed
2 checks passed
License Compliance All checks passed.
Details
Quansight-Labs.uarray #20190812.13 succeeded
Details
@peterbell10 peterbell10 deleted the string-warning branch Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.