From: Mathias Preiner Date: Wed, 16 Mar 2022 02:22:21 +0000 (-0700) Subject: api: Make mkDatatypeDecl argument const&. (#8315) X-Git-Tag: cvc5-1.0.0~243 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bca1e6c4daba31d5c216a86ce3997f0a46a3cd5;p=cvc5.git api: Make mkDatatypeDecl argument const&. (#8315) --- diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp index 4f3a768a1..dda7aacc7 100644 --- a/src/api/cpp/cvc5.cpp +++ b/src/api/cpp/cvc5.cpp @@ -6182,7 +6182,7 @@ DatatypeDecl Solver::mkDatatypeDecl(const std::string& name, bool isCoDatatype) } DatatypeDecl Solver::mkDatatypeDecl(const std::string& name, - Sort param, + const Sort& param, bool isCoDatatype) { CVC5_API_TRY_CATCH_BEGIN; diff --git a/src/api/cpp/cvc5.h b/src/api/cpp/cvc5.h index 1138eafc8..eedc10b80 100644 --- a/src/api/cpp/cvc5.h +++ b/src/api/cpp/cvc5.h @@ -3718,7 +3718,7 @@ class CVC5_EXPORT Solver * @return the DatatypeDecl */ DatatypeDecl mkDatatypeDecl(const std::string& name, - Sort param, + const Sort& param, bool isCoDatatype = false); /** diff --git a/src/api/python/cvc5.pxd b/src/api/python/cvc5.pxd index 9350ca0bf..07250f143 100644 --- a/src/api/python/cvc5.pxd +++ b/src/api/python/cvc5.pxd @@ -247,8 +247,8 @@ cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api": DatatypeConstructorDecl mkDatatypeConstructorDecl(const string& name) except + DatatypeDecl mkDatatypeDecl(const string& name) except + DatatypeDecl mkDatatypeDecl(const string& name, bint isCoDatatype) except + - DatatypeDecl mkDatatypeDecl(const string& name, Sort param) except + - DatatypeDecl mkDatatypeDecl(const string& name, Sort param, bint isCoDatatype) except + + DatatypeDecl mkDatatypeDecl(const string& name, const Sort& param) except + + DatatypeDecl mkDatatypeDecl(const string& name, const Sort& param, bint isCoDatatype) except + DatatypeDecl mkDatatypeDecl(const string& name, vector[Sort]& params) except + DatatypeDecl mkDatatypeDecl(const string& name, vector[Sort]& params, bint isCoDatatype) except + # default value for symbol defined in cpp/cvc5.h