GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-121249: adjust formatting codes for complex types in struct/ctypes modules by skirpichev · Pull Request #132827 · python/cpython Conversation
|
| _type_ = "C" | ||
| _type_ = "D" | ||
| _check_size(c_double_complex) | ||
| class c_float_complex(_SimpleCData): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe you should define c_float_complex first, just like c_float is defined before c_double above?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| double complex D; | ||
| float complex F; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe change order?
| double complex D; | |
| float complex F; | |
| float complex F; | |
| double complex D; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@skirpichev At the expense of a larger diff, maybe you should review defining/declaring things related to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I'm not sure this worth.
And fixing that for complex types will not change this state. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| long l; | ||
| long long q; | ||
| long double D; | ||
| long double g; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@vstinner, this is something I worry about here.
IIUIC, this is a private interface and we can rename it's members. It seems this is not used across the codebase, but I appreciate a second look. (No tests seems to be affected, though maybe it's just lack of test coverage.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It seems this is not used across the codebase,
I confirm, the long double member is simply not used. I would suggest to remove it (but in a separated PR).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to remove it
I'm not sure. It seems, naming of union members aren't used - only size is important.
As long as we keep one-letter codes, I think it's good to have corresponding members in this struct.
Same holds for struct tagPyCArgObject - I forgot to update that. I'll make a patch. BTW do we need different (wrt union result) unnamed union here? I doubt.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Merged, thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.