3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-19 17:50:23 +00:00

merge with master

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-03-25 14:57:01 -07:00
commit c513f3ca09
883 changed files with 13979 additions and 16480 deletions

View file

@ -361,7 +361,7 @@ void * memory::allocate(size_t s) {
if (counts_exceeded)
throw_alloc_counts_exceeded();
void * r = malloc(s);
if (r == 0)
if (r == nullptr)
throw_out_of_memory();
*(static_cast<size_t*>(r)) = s;
return static_cast<size_t*>(r) + 1; // we return a pointer to the location after the extra field
@ -389,7 +389,7 @@ void* memory::reallocate(void *p, size_t s) {
if (counts_exceeded)
throw_alloc_counts_exceeded();
void *r = realloc(real_p, s);
if (r == 0)
if (r == nullptr)
throw_out_of_memory();
*(static_cast<size_t*>(r)) = s;
return static_cast<size_t*>(r) + 1; // we return a pointer to the location after the extra field