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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9befc135-35ee-bcb1-71ba-03db17b24825 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 815C:3327D8:EDC438:14C9F24:6971FB69 |
| html-safe-nonce | 1cc899922422a27c233fc25b5778fc0fc0cb04f150a6280bd30625d13e104a33 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTVDOjMzMjdEODpFREM0Mzg6MTRDOUYyNDo2OTcxRkI2OSIsInZpc2l0b3JfaWQiOiI1ODYyNTUzMjE0NjA2NTA2ODU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7bafd694425218ae00a461df08d7a2e79a6aa517b859f2fe3829b0cbaa6fc828 |
| hovercard-subject-tag | pull_request:613502916 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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 | 5d01a3551afdd1a0e12e78acaf3ba43a9a1f7dcb518695d6ed59db76a9290f13 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 062b05dcdf64ee7a3dad7acabb746494ae0982cc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width