P99
|
◆ P99_UNWIND_RETURN
Value:
/* we use a special form of short circuit evaluation here, since \
setjmp is only allowed in restricted contexts */ \
switch (!!p00_unwind_bottom) \
case 1: \
/* If an unwind is possible, i.e if we are not in the outer frame \
this will stop the evaluation of the expression here, and unwind \
as side effect. Otherwise, this will continue normally and \
directly proceed with the return. */ \
if (!setjmp(p00_unwind_bottom[0]->p00_buf)) { \
/* assign before we unwind all the way down */ \
p00_unwind_bottom[0]->p00_returning = 1; \
P99_UNWIND(-p99_unwind_return); \
Return from the enclosing function after unwinding all levels of nested P99_UNWIND_PROTECT. By this you can guarantee that all eventually existing P99_PROTECT parts of enclosing P99_UNWIND_PROTECT are properly executed. This is in some way similar to the guarantee of C++ to call destructors before returning from a function. There is one important difference, though: the P99_UNWIND_RETURN expr;
You might want do something like volatile retType myret = expr;
P99_UNWIND_RETURN myret;
Definition at line 691 of file p99_block.h. |