timemodule.c: Cast PyUnicode_AsUTF8() to char*#1294
Merged
vstinner merged 1 commit intopython:masterfrom Apr 26, 2017
vstinner:tm_zone_const
Merged
timemodule.c: Cast PyUnicode_AsUTF8() to char*#1294vstinner merged 1 commit intopython:masterfrom vstinner:tm_zone_const
vstinner merged 1 commit intopython:masterfrom
vstinner:tm_zone_const
Conversation
bpo-28769 changed PyUnicode_AsUTF8() return type from const char* to char* in Python 3.7, but tm_zone field type of the tm structure is char* on FreeBSD. Cast PyUnicode_AsUTF8() to char* in gettmarg() to fix the warning: Modules/timemodule.c:443:20: warning: assigning to 'char *' from 'const char *' discards qualifiers
|
@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @abalkin, @loewis and @benjaminp to be potential reviewers. |
Member
Author
|
Note: I tested manually this PR on FreeBSD: it fixes the warning, timemodule.c compilation doesn't emit any warning anymore. |
serhiy-storchaka
approved these changes
Apr 26, 2017
AraHaan
approved these changes
Apr 26, 2017
Member
|
|
Member
Author
|
Merged. Thanks for the review @serhiy-storchaka and @AraHaan ;-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


bpo-28769 changed PyUnicode_AsUTF8() return type from const char* to char* in Python 3.7, but tm_zone field type of the tm structure is char* on FreeBSD.
Cast PyUnicode_AsUTF8() to char* in gettmarg() to fix the warning:
See http://bugs.python.org/issue28769