mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 22:05:45 +00:00
Note that Z3_get_numeral_small is essentially redundant (#7599)
* Check that Z3_get_numeral_small is given non-null out params Analogous to other Z3_get_numeral_* functions with out params. * Note that Z3_get_numeral_small is essentially redundant The error behavior of Z3_get_numeral_small does not follow the pattern of the other functions. The functions that have out params and return a bool indicating success (such as Z3_get_numeral_rational_int64) return false rather than signaling an error when given an unsupported expression argument (such as a rounding mode value). The functions that do not have out params signal an error in such cases. Z3_get_numeral_small is the odd one out in that it signals errors and returns a status bool. This error handling is the only difference between Z3_get_numeral_small and Z3_get_numeral_rational_int64, so this patch adds a comment to the documentation.
This commit is contained in:
parent
63ad2837e2
commit
8d81a2dcaf
2 changed files with 6 additions and 0 deletions
|
@ -5109,6 +5109,8 @@ extern "C" {
|
|||
|
||||
Return \c true if the numeral value fits in 64 bit numerals, \c false otherwise.
|
||||
|
||||
Equivalent to \c Z3_get_numeral_rational_int64 except that for unsupported expression arguments \c Z3_get_numeral_small signals an error while \c Z3_get_numeral_rational_int64 returns \c false.
|
||||
|
||||
\pre Z3_get_ast_kind(a) == Z3_NUMERAL_AST
|
||||
|
||||
def_API('Z3_get_numeral_small', BOOL, (_in(CONTEXT), _in(AST), _out(INT64), _out(INT64)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue