Title: Replace magic offsets with proper offset calculation by lostmsu · Pull Request #1441 · pythonnet/pythonnet · GitHub
Open Graph Title: Replace magic offsets with proper offset calculation by lostmsu · Pull Request #1441 · pythonnet/pythonnet
X Title: Replace magic offsets with proper offset calculation by lostmsu · Pull Request #1441 · pythonnet/pythonnet
Description: All Python types created to represent CLR concepts derive from CLR MetaType (as before), which now has two new fields:
tp_clr_inst_offset, which is similar to tp_dictoffset in that it tells where to find GCHandle in instances of this type (e.g. where to find GCHandle pointing to System.Uri in corresponding Python object)
tp_clr_inst, which holds an optional instance of ManagedType, that implements the behavior of the type itself (e.g. GCHandle pointing to ClassObject(type = System.Uri))
So the layout of all Python types created by Python.NET is
PyType type;
nint tp_clr_inst_offset;
GCHandle tp_clr_inst; // points, for example, to an instance of `ClassObject`
When a Python type, that reflects CLR type is created (such as
Open Graph Description: All Python types created to represent CLR concepts derive from CLR MetaType (as before), which now has two new fields: tp_clr_inst_offset, which is similar to tp_dictoffset in that it tells where ...
X Description: All Python types created to represent CLR concepts derive from CLR MetaType (as before), which now has two new fields: tp_clr_inst_offset, which is similar to tp_dictoffset in that it tells where ...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1441
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:79c3450f-ec3d-32b4-e98e-d1b80b504f58 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | EA0C:129B62:3C34950:544B0A9:69713194 |
| html-safe-nonce | f8b0ab0b1195a7fcc1950047e785a9643d9bc7475446431cbc4fda1c914467b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTBDOjEyOUI2MjozQzM0OTUwOjU0NEIwQTk6Njk3MTMxOTQiLCJ2aXNpdG9yX2lkIjoiODI3MzQ3NzM1MzI0NTU4NTgxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a7d2e4a639b654817a878c9472c94edf9363a54581679522cd500dfdcdd8b232 |
| hovercard-subject-tag | pull_request:613502916 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/pythonnet/pythonnet/pull/1441/checks |
| twitter:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| og:image:alt | All Python types created to represent CLR concepts derive from CLR MetaType (as before), which now has two new fields: tp_clr_inst_offset, which is similar to tp_dictoffset in that it tells where ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0c91dba94f720b71e069760db74b45f0f69e50caa632dc4e976d5bf46c8242ee |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6c1902093917264567791cc30776acd1b2490c9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width