3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-12-18 11:27:04 -08:00
parent b6bf299b8b
commit 35e8decdb1
4 changed files with 6 additions and 7 deletions

View file

@ -106,8 +106,8 @@ extern "C" {
SET_ERROR_CODE(Z3_INVALID_ARG, "expression is not a string literal");
return "";
}
std::string result = str.encode();
return mk_c(c)->mk_external_string(result);
std::string s = str.encode();
return mk_c(c)->mk_external_string(s);
Z3_CATCH_RETURN("");
}

View file

@ -9914,6 +9914,8 @@ class SeqRef(ExprRef):
def as_string(self):
"""Return a string representation of sequence expression."""
if self.is_string_value():
return Z3_get_string(self.ctx_ref(), self.as_ast())
return Z3_ast_to_string(self.ctx_ref(), self.as_ast())