- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | mattneri |
|---|---|
| Recipients | mattneri |
| Date | 2018-09-07.11:15:17 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
|---|
Marshalling the following C structure with ctypes in Windows (compiled with VS2015) is not working correctly.
As you can see, in the simple demo program I attached, the integer I pass as a parameter gets somehow corrupted. I use cdecl calling convention.
The corruption happens only if the returned structure contains 3 booleans, if I add a fourth bool to the structure than I get expected results.
In linux (compiling with Gcc) the same code (with 3 booleans) work as expected.
typedef uint64_t CustomHandle;
typedef struct
{
bool first;
bool second;
bool third;
} Flags;
CustomHandle GetHandle();
Flags GetFlags(CustomHandle handle);
As already mention I attached all the files to reproduce the issue with the related cmake file |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2018-09-07 11:15:17 | mattneri | set | recipients: + mattneri |
| 2018-09-07 11:15:17 | mattneri | set | messageid: <1536318917.89.0.56676864532.issue34603@psf.upfronthosting.co.za> |
| 2018-09-07 11:15:17 | mattneri | link | issue34603 messages |
| 2018-09-07 11:15:17 | mattneri | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
