Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12407383 authored by codeworkx's avatar codeworkx Committed by Steve Kondik
Browse files

libutils: refbase: jellybean mr1 compat

[mikeioannina]: Update for L
Can be enabled with global cflag REFBASE_JB_MR1_COMPAT_SYMBOLS

Change-Id: Ideee0c3814a17b47f70fd612d27067fe19ae698d
parent 252000b6
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -53,6 +53,15 @@ inline bool operator _op_ (const U* o) const { \

// ---------------------------------------------------------------------------

#ifdef REFBASE_JB_MR1_COMPAT_SYMBOLS
class ReferenceConverterBase {
public:
    virtual size_t getReferenceTypeSize() const = 0;
    virtual void* getReferenceBase(void const*) const = 0;
    inline virtual ~ReferenceConverterBase() { }
};
#endif

class ReferenceRenamer {
protected:
    // destructor is purposedly not virtual so we avoid code overhead from
+7 −0
Original line number Diff line number Diff line
@@ -630,6 +630,13 @@ void RefBase::onLastWeakRef(const void* /*id*/)

// ---------------------------------------------------------------------------

#ifdef REFBASE_JB_MR1_COMPAT_SYMBOLS
extern "C" void _ZN7android7RefBase14moveReferencesEPvPKvjRKNS_22ReferenceConverterBaseE(void* /*dst*/, void const* /*src*/, size_t /*n*/,
        const ReferenceConverterBase& /*caster*/)
{
}
#endif

#if DEBUG_REFS
void RefBase::renameRefs(size_t n, const ReferenceRenamer& renamer) {
    for (size_t i=0 ; i<n ; i++) {