mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 19:52:29 +00:00 
			
		
		
		
	Fixed bug in UP (#7545)
* Fixed bug in UP * Put decrement at the right position
This commit is contained in:
		
							parent
							
								
									17d47ca8c7
								
							
						
					
					
						commit
						091984419e
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -4305,15 +4305,18 @@ namespace z3 { | |||
|         context*   c; | ||||
|         std::vector<z3::context*> subcontexts; | ||||
| 
 | ||||
|         unsigned   m_callbackNesting = 0; | ||||
|         Z3_solver_callback cb { nullptr }; | ||||
| 
 | ||||
|         struct scoped_cb { | ||||
|             user_propagator_base& p; | ||||
|             scoped_cb(void* _p, Z3_solver_callback cb):p(*static_cast<user_propagator_base*>(_p)) { | ||||
|                 p.cb = cb; | ||||
|                 p.m_callbackNesting++; | ||||
|             } | ||||
|             ~scoped_cb() { | ||||
|                 p.cb = nullptr; | ||||
|                 if (--p.m_callbackNesting == 0) | ||||
|                     p.cb = nullptr; | ||||
|             } | ||||
|         }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue