Skip to content

Commit 7460dc0

Browse files
committed
Revert "Add return value policy _clif_automatic (#4343)"
This reverts commit 6d3a0fc.
1 parent 7a945d8 commit 7460dc0

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

include/pybind11/detail/common.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -554,16 +554,7 @@ enum class return_value_policy : uint8_t {
554554
but the purpose of _return_as_bytes is certain to be orthogonal, because
555555
C++ strings are always copied to Python `bytes` or `str`.
556556
NOTE: This policy is NOT available on master. */
557-
_return_as_bytes,
558-
559-
/** This policy should only be used by PyCLIF to automatically select a
560-
return value policy. Legacy PyCLIF automatically decides object lifetime
561-
management based on their properties:
562-
https://github.com/google/clif/tree/main/clif/python#pointers-references-and-object-ownership
563-
With this policy, the return value policy selection is consistent with
564-
legacy PyCLIF.
565-
NOTE: This policy is NOT available on master. */
566-
_clif_automatic
557+
_return_as_bytes
567558
};
568559

569560
#define PYBIND11_HAS_RETURN_VALUE_POLICY_RETURN_AS_BYTES

include/pybind11/detail/smart_holder_type_casters.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,6 @@ struct smart_holder_type_caster<std::shared_ptr<T>> : smart_holder_type_caster_l
918918
break;
919919
case return_value_policy::reference_internal:
920920
case return_value_policy::_return_as_bytes:
921-
case return_value_policy::_clif_automatic:
922921
break;
923922
}
924923
if (!src) {

0 commit comments

Comments
 (0)