Title: geninterop.py doesn't handle c_ast.FuncDecl; creates broken interop38.cs · Issue #995 · pythonnet/pythonnet · GitHub
Open Graph Title: geninterop.py doesn't handle c_ast.FuncDecl; creates broken interop38.cs · Issue #995 · pythonnet/pythonnet
X Title: geninterop.py doesn't handle c_ast.FuncDecl; creates broken interop38.cs · Issue #995 · pythonnet/pythonnet
Description: Details I'm concerned that the automated process pythonnet uses to generate the interop[version].cs file might be flawed. This is the relevant snippet from object.h unsigned int tp_version_tag; destructor tp_finalize; vectorcallfunc tp_v...
Open Graph Description: Details I'm concerned that the automated process pythonnet uses to generate the interop[version].cs file might be flawed. This is the relevant snippet from object.h unsigned int tp_version_tag; des...
X Description: Details I'm concerned that the automated process pythonnet uses to generate the interop[version].cs file might be flawed. This is the relevant snippet from object.h unsigned int tp_version_tag;...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/995
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"geninterop.py doesn't handle c_ast.FuncDecl; creates broken interop38.cs","articleBody":"### Details\r\n\r\nI'm concerned that the automated process pythonnet uses to generate the interop[version].cs file might be flawed. This is the relevant snippet from `object.h`\r\n\r\n```\r\n unsigned int tp_version_tag;\r\n destructor tp_finalize;\r\n vectorcallfunc tp_vectorcall;\r\n /* bpo-37250: kept for backwards compatibility in CPython 3.8 only */\r\n Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);\r\n```\r\n\r\nthis is how I mapped those fields in my handmade interop38.cs\r\n\r\n```\r\n public static int tp_version_tag = 0;\r\n public static int tp_finalize = 0;\r\n public static int tp_vectorcall = 0;\r\n public static int tp_print = 0;\r\n public static int am_await = 0;\r\n```\r\n\r\nbut here's how the auto-generated interop38.cs maps them\r\n\r\n```\r\n public static int tp_version_tag = 0;\r\n public static int tp_finalize = 0;\r\n public static int tp_vectorcall = 0;\r\n public static int am_await = 0;\r\n```\r\n\r\nNotice the missing **public static int tp_print = 0;**\r\n\r\nI'm thinking that the `Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);` messed up the auto-gen technique? Won't all fields following `tp_vectorcall` be offset incorrectly due to this?","author":{"url":"https://github.com/Jeff17Robbins","@type":"Person","name":"Jeff17Robbins"},"datePublished":"2019-11-27T19:09:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/995/pythonnet/issues/995"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:46208680-0abf-0560-5faf-f3fb7bd75b03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D70A:5EAB0:39B5B7:4CCB7A:69715952 |
| html-safe-nonce | db79d250655c9040c189e26e4a2fd1908ae831c6eeea9c5c82eb2ac0855177a8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzBBOjVFQUIwOjM5QjVCNzo0Q0NCN0E6Njk3MTU5NTIiLCJ2aXNpdG9yX2lkIjoiNDQ3NDAwOTQ3MzQyODU3NjU5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c03bbfa61b8ab10afa63da7ea768290a61fd0b0edfc1c68432bfb8758c9d937f |
| hovercard-subject-tag | issue:529527490 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/995/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e7a91e018c1b4f95407510076769630fc9397ddc5d3759f999e3464f44f636f/pythonnet/pythonnet/issues/995 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e7a91e018c1b4f95407510076769630fc9397ddc5d3759f999e3464f44f636f/pythonnet/pythonnet/issues/995 |
| og:image:alt | Details I'm concerned that the automated process pythonnet uses to generate the interop[version].cs file might be flawed. This is the relevant snippet from object.h unsigned int tp_version_tag; des... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Jeff17Robbins |
| hostname | github.com |
| expected-hostname | github.com |
| None | fd5876ec68f4a61d42f4010f6d1b2764d8ae314777de44028a7708a1d7bac1b5 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8f48ed2345879fb640360c3a24f1d1780c3ed3cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width