Skip to content

Commit e7fde59

Browse files
committed
it-> to func. and dealloc comment
1 parent 0daf608 commit e7fde59

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/pybind11/pybind11.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ class cpp_function : public function {
491491
size_t args_copied = 0;
492492

493493
// 0. Inject new-style `self` argument
494-
if (it->is_new_style_constructor) {
494+
if (func.is_new_style_constructor) {
495495
// The `value` may have been preallocated by an old-style `__init__`
496496
// if it was a preceding candidate for overload resolution.
497497
if (self_value_and_holder)

tests/test_factory_constructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ def test_reallocations(capture, msg):
351351
create_and_destroy(1.5)
352352
assert msg(capture) == strip_comments("""
353353
noisy new # allocation required to attempt first overload
354-
noisy delete # have to dealloc before stashing factory-generated pointer
354+
noisy delete # have to dealloc before considering factory init overload
355355
noisy new # pointer factory calling "new", part 1: allocation
356356
NoisyAlloc(double 1.5) # ... part two, invoking constructor
357357
---

0 commit comments

Comments
 (0)