Kaydet (Commit) ad7302b5 authored tarafından Jan-Marek Glogowski's avatar Jan-Marek Glogowski Kaydeden (comit) Thorsten Behrens

[API CHANGE] Restore old exteral API behaviour

Commit d38f9934 ("[API CHANGE]
Asserts to never clear already cleared guard") changes the API
in a way, which can silently break compiling code for no reason.

As discussed on the mailing list, this uses LIBO_INTERNAL_ONLY to
restores the old behaviour for external API users.

Change-Id: I43c9b955c1c8f5402588fcea2bfc38ab6fa9f263
Reviewed-on: https://gerrit.libreoffice.org/70528Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
üst 5dfc4fd2
......@@ -185,9 +185,15 @@ namespace osl
*/
void clear()
{
#ifdef LIBO_INTERNAL_ONLY
assert(pT);
pT->release();
pT = NULL;
#else
if (pT)
#endif
{
pT->release();
pT = NULL;
}
}
};
......@@ -226,9 +232,14 @@ namespace osl
*/
void reset()
{
#ifdef LIBO_INTERNAL_ONLY
assert(!this->pT);
this->pT = pResetT;
this->pT->acquire();
#endif
if (pResetT)
{
this->pT = pResetT;
this->pT->acquire();
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment