[issue39943] Meta: Clean up various issues in C internals

2021-03-14 Thread miss-islington
miss-islington added the comment: New changeset cf8d6ef9629dc1bffadfcec251a2ffe30d5addaa by Miss Islington (bot) in branch '3.9': bpo-39943: Fix MSVC warnings in sre extension (GH-20508) https://github.com/python/cpython/commit/cf8d6ef9629dc1bffadfcec251a2ffe30d5addaa --

[issue39943] Meta: Clean up various issues in C internals

2021-03-14 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +23616 pull_request: https://github.com/python/cpython/pull/24856 ___ Python tracker

[issue39943] Meta: Clean up various issues in C internals

2020-06-01 Thread STINNER Victor
STINNER Victor added the comment: If someone is interested, there is a one remaining compiler warning in frameobject.c which is likely easy to fix: D:\a\cpython\cpython\Objects\frameobject.c(400,1): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data

[issue39943] Meta: Clean up various issues in C internals

2020-06-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset 06e3a27a3c863495390a07c695171a8e62a6e0d2 by Ammar Askar in branch 'master': bpo-39943: Fix MSVC warnings in sre extension (GH-20508) https://github.com/python/cpython/commit/06e3a27a3c863495390a07c695171a8e62a6e0d2 --

[issue39943] Meta: Clean up various issues in C internals

2020-05-29 Thread Ammar Askar
Change by Ammar Askar : -- pull_requests: +19754 pull_request: https://github.com/python/cpython/pull/20508 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-05-29 Thread Ammar Askar
Ammar Askar added the comment: For sre.c, this is definitely a bug in MSVC, see: * https://stackoverflow.com/questions/10403713/why-does-visual-c-warn-on-implicit-cast-from-const-void-to-void-in-c-but * https://godbolt.org/z/BpMqA_ I'm trying to get rid of MSVC warnings to unblock

[issue39943] Meta: Clean up various issues in C internals

2020-04-21 Thread STINNER Victor
STINNER Victor added the comment: > Yes, it is a consequence of PR 19345. But it looks like a compiler bug. It > complains about implicit conversion from `const void **` to `void *` in > memcpy() and PyMem_Del(). Is it possible to add an explicit cast to make the compiler warnings quiet?

[issue39943] Meta: Clean up various issues in C internals

2020-04-16 Thread Andy Lester
Andy Lester added the comment: I'm assuming that you're getting this sre_lib.h error when compiling Modules/_sre.c. -- ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-04-14 Thread Andy Lester
Andy Lester added the comment: I remember coming across a similar error from GCC about casting from a const double pointer to a single pointer void and it said (I believe) something about having to have each cast having to be valid. I think it was implying something like that if you have

[issue39943] Meta: Clean up various issues in C internals

2020-04-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is a consequence of PR 19345. But it looks like a compiler bug. It complains about implicit conversion from `const void **` to `void *` in memcpy() and PyMem_Del(). -- ___ Python tracker

[issue39943] Meta: Clean up various issues in C internals

2020-04-13 Thread STINNER Victor
STINNER Victor added the comment: Not sure if it's related to changes made recently on this issue, but I started to notice these compiler warnings on Windows: D:\a\cpython\cpython\Modules\sre_lib.h(822,21): warning C4090: 'function': different 'const' qualifiers

[issue39943] Meta: Clean up various issues in C internals

2020-04-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8f87eefe7f0576c05c488874eb9601a7a87c7312 by Serhiy Storchaka in branch 'master': bpo-39943: Add the const qualifier to pointers on non-mutable PyBytes data. (GH-19472)

[issue39943] Meta: Clean up various issues in C internals

2020-04-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18827 pull_request: https://github.com/python/cpython/pull/19472 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-04-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cd8295ff758891f21084a6a5ad3403d35dda38f7 by Serhiy Storchaka in branch 'master': bpo-39943: Add the const qualifier to pointers on non-mutable PyUnicode data. (GH-19345)

[issue39943] Meta: Clean up various issues in C internals

2020-04-10 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39943] Meta: Clean up various issues in C internals

2020-04-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 38ada3bac8205a7690d573d715b0e84e60297c4c by Andy Lester in branch 'master': bpo-39943: Keep constness of pointer objects. (19405) https://github.com/python/cpython/commit/38ada3bac8205a7690d573d715b0e84e60297c4c -- nosy:

[issue39943] Meta: Clean up various issues in C internals

2020-04-09 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39943] Meta: Clean up various issues in C internals

2020-04-08 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18800 pull_request: https://github.com/python/cpython/pull/19445 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-04-06 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18766 pull_request: https://github.com/python/cpython/pull/19405 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-04-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18709 pull_request: https://github.com/python/cpython/pull/19345 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-04-02 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18692 pull_request: https://github.com/python/cpython/pull/19327 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2c003eff8fef430f1876adf88e466bcfcbd0cc9e by Serhiy Storchaka in branch 'master': bpo-39943: Clean up marshal.c. (GH-19236) https://github.com/python/cpython/commit/2c003eff8fef430f1876adf88e466bcfcbd0cc9e --

[issue39943] Meta: Clean up various issues in C internals

2020-03-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18593 pull_request: https://github.com/python/cpython/pull/19236 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-30 Thread Brett Cannon
Brett Cannon added the comment: New changeset fc2d8d62af25be90f5fd490df141a775d9619b23 by Andy Lester in branch 'master': bpo-39943: Remove unnecessary casts in import.c that remove constness (GH-19209) https://github.com/python/cpython/commit/fc2d8d62af25be90f5fd490df141a775d9619b23

[issue39943] Meta: Clean up various issues in C internals

2020-03-28 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18573 pull_request: https://github.com/python/cpython/pull/19210 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-28 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18572 pull_request: https://github.com/python/cpython/pull/19209 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-27 Thread Andy Lester
Andy Lester added the comment: Casting tail to (void *)tail was the correct thing to do. The problem is that casting to void* casts away the constness of tail. The even more correct thing to do is what my patch does, which is cast it to (const void *)tail. There is no functional

[issue39943] Meta: Clean up various issues in C internals

2020-03-27 Thread STINNER Victor
STINNER Victor added the comment: > However, it does quiet the -Wcast-qual compiler warning that could be a > helpful addition some time in the future. Aha, that's intesting. It helps me if I can see that your change fix a compiler warning that I can reproduce. If I build Objects/obmalloc.c

[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread Andy Lester
Andy Lester added the comment: It doesn't quiet any compiler warnings given the default compiler warnings that ./configure sets. However, it does quiet the -Wcast-qual compiler warning that could be a helpful addition some time in the future. I think it would be great, for example, if it

[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread STINNER Victor
STINNER Victor added the comment: What is the rationale for adding const? For example, does the PR 19185 fix any compiler warning or any bug? While PR 19185 is correct, I am not sure that we should modify the 607K lines of C code of CPython to add const everywhere. I'm fine with using const

[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18545 pull_request: https://github.com/python/cpython/pull/19186 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-26 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18544 pull_request: https://github.com/python/cpython/pull/19185 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-25 Thread Inada Naoki
Inada Naoki added the comment: New changeset 62d21c9d900664b2ca30c2d7edd80b6628abdf62 by Andy Lester in branch 'master': bpo-39943: Properly const the pointers in dictkeys_get_index (GH-19170) https://github.com/python/cpython/commit/62d21c9d900664b2ca30c2d7edd80b6628abdf62 --

[issue39943] Meta: Clean up various issues in C internals

2020-03-25 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18530 pull_request: https://github.com/python/cpython/pull/19170 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-24 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18513 pull_request: https://github.com/python/cpython/pull/19152 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-17 Thread STINNER Victor
STINNER Victor added the comment: New changeset 982307b9cceef36e30ac43b13032d68c3b921adc by Andy Lester in branch 'master': bpo-39943: Remove unused self from find_nfc_index() (GH-18973) https://github.com/python/cpython/commit/982307b9cceef36e30ac43b13032d68c3b921adc -- nosy:

[issue39943] Meta: Clean up various issues in C internals

2020-03-12 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18322 pull_request: https://github.com/python/cpython/pull/18973 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39943] Meta: Clean up various issues in C internals

2020-03-11 Thread Andy Lester
Change by Andy Lester : -- keywords: +patch pull_requests: +18301 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18950 ___ Python tracker ___

[issue39943] Meta: Clean up various issues in C internals

2020-03-11 Thread Andy Lester
Change by Andy Lester : -- title: Meta: Clean up various issues -> Meta: Clean up various issues in C internals ___ Python tracker ___

[issue39943] Meta: Clean up various issues

2020-03-11 Thread Andy Lester
New submission from Andy Lester : This is a meta-ticket for a number of small PRs that clean up some internals. Issues will include: * Removing unnecessary casts * consting pointers that can be made const * Removing unused function arguments * etc -- components: Interpreter Core