xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBProgressExtensions.i (revision 700637cbb5e582861067a11aaca4d053546871d2)
1*700637cbSDimitry Andric %extend lldb::SBProgress {
2*700637cbSDimitry Andric #ifdef SWIGPYTHON
3*700637cbSDimitry Andric     %pythoncode %{
4*700637cbSDimitry Andric         def __enter__(self):
5*700637cbSDimitry Andric             '''No-op for with statement'''
6*700637cbSDimitry Andric             pass
7*700637cbSDimitry Andric 
8*700637cbSDimitry Andric         def __exit__(self, exc_type, exc_value, traceback):
9*700637cbSDimitry Andric             '''Finalize the progress object'''
10*700637cbSDimitry Andric             self.Finalize()
11*700637cbSDimitry Andric     %}
12*700637cbSDimitry Andric #endif
13*700637cbSDimitry Andric }