Title: added 'construct_custodian_for' and test by ukoethe · Pull Request #8 · boostorg/python · GitHub
Open Graph Title: added 'construct_custodian_for' and test by ukoethe · Pull Request #8 · boostorg/python
X Title: added 'construct_custodian_for' and test by ukoethe · Pull Request #8 · boostorg/python
Description: (note: I will update the documentation as well when this pull request gets accepted)
This pull request proposes a fix for the long-standing problem that with_custodian_and_ward_postcall doesn't work in connection with make_constructor (see e.g. https://mail.python.org/pipermail/cplusplus-sig/2007-June/012145.html).
Consider the following class definitions:
struct A {
int i_;
A(int i)
: i_(i)
{}
};
struct B {
A * a_;
B(A * a)
: a_(a)
{}
int a_content()
{
return a_ == 0 ? 0 : a_->i_;
}
};
B * create_B(A * a)
{
return new B(a);
}
and the corresponding boost::python glue code
BOOST_PYTHON_MODULE(test_custodian_and_ward)
{
class_("A", no_init)
.def(init
Open Graph Description: (note: I will update the documentation as well when this pull request gets accepted) This pull request proposes a fix for the long-standing problem that with_custodian_and_ward_postcall doesn't...
X Description: (note: I will update the documentation as well when this pull request gets accepted) This pull request proposes a fix for the long-standing problem that with_custodian_and_ward_postcall doesn&#...
Opengraph URL: https://github.com/boostorg/python/pull/8
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:a618e81a-f6ee-5c2b-4d3e-ca64f2004b8f |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 93C6:1C7DFD:591F127:737F4B5:697546F3 |
| html-safe-nonce | c3bb83e5f6095f7eef8bc1ab52868c6aeb414a255804f6b9c8bb9b0d1d76c5c3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0M2OjFDN0RGRDo1OTFGMTI3OjczN0Y0QjU6Njk3NTQ2RjMiLCJ2aXNpdG9yX2lkIjoiMjg5ODg5ODg1NTQ5MzE5MTQxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fe6190c0bf15e90760cac2843efa349bab3350034cbf860d5b958047ddbd3efc |
| hovercard-subject-tag | pull_request:15741897 |
| 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/boostorg/python/pull/8/files |
| twitter:image | https://avatars.githubusercontent.com/u/897680?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/897680?s=400&v=4 |
| og:image:alt | (note: I will update the documentation as well when this pull request gets accepted) This pull request proposes a fix for the long-standing problem that with_custodian_and_ward_postcall doesn't... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/boostorg/python git https://github.com/boostorg/python.git |
| octolytics-dimension-user_id | 3170529 |
| octolytics-dimension-user_login | boostorg |
| octolytics-dimension-repository_id | 7589968 |
| octolytics-dimension-repository_nwo | boostorg/python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7589968 |
| octolytics-dimension-repository_network_root_nwo | boostorg/python |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width