@@ -32,7 +32,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
3232 mlir_type_subclass (m, " AttributeType" , mlirTypeIsAPDLAttributeType);
3333 attributeType.def_classmethod (
3434 " get" ,
35- [](nb::object cls, MlirContext ctx) {
35+ [](const nb::object & cls, MlirContext ctx) {
3636 return cls (mlirPDLAttributeTypeGet (ctx));
3737 },
3838 " Get an instance of AttributeType in given context." , nb::arg (" cls" ),
@@ -46,7 +46,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
4646 mlir_type_subclass (m, " OperationType" , mlirTypeIsAPDLOperationType);
4747 operationType.def_classmethod (
4848 " get" ,
49- [](nb::object cls, MlirContext ctx) {
49+ [](const nb::object & cls, MlirContext ctx) {
5050 return cls (mlirPDLOperationTypeGet (ctx));
5151 },
5252 " Get an instance of OperationType in given context." , nb::arg (" cls" ),
@@ -59,7 +59,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
5959 auto rangeType = mlir_type_subclass (m, " RangeType" , mlirTypeIsAPDLRangeType);
6060 rangeType.def_classmethod (
6161 " get" ,
62- [](nb::object cls, MlirType elementType) {
62+ [](const nb::object & cls, MlirType elementType) {
6363 return cls (mlirPDLRangeTypeGet (elementType));
6464 },
6565 " Gets an instance of RangeType in the same context as the provided "
@@ -77,7 +77,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
7777 auto typeType = mlir_type_subclass (m, " TypeType" , mlirTypeIsAPDLTypeType);
7878 typeType.def_classmethod (
7979 " get" ,
80- [](nb::object cls, MlirContext ctx) {
80+ [](const nb::object & cls, MlirContext ctx) {
8181 return cls (mlirPDLTypeTypeGet (ctx));
8282 },
8383 " Get an instance of TypeType in given context." , nb::arg (" cls" ),
@@ -90,7 +90,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
9090 auto valueType = mlir_type_subclass (m, " ValueType" , mlirTypeIsAPDLValueType);
9191 valueType.def_classmethod (
9292 " get" ,
93- [](nb::object cls, MlirContext ctx) {
93+ [](const nb::object & cls, MlirContext ctx) {
9494 return cls (mlirPDLValueTypeGet (ctx));
9595 },
9696 " Get an instance of TypeType in given context." , nb::arg (" cls" ),
0 commit comments