xpcom/reflect/xptcall/src/xptcprivate.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /* All the xptcall private declarations - only include locally. */
     8 #ifndef xptcprivate_h___
     9 #define xptcprivate_h___
    11 #include "xptcall.h"
    12 #include "nsAutoPtr.h"
    13 #include "mozilla/Attributes.h"
    15 class xptiInterfaceEntry;
    17 #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
    18 #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
    19 #else
    20 #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t) = 0;
    21 #endif
    23 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() = 0;
    25 class nsIXPTCStubBase : public nsISupports
    26 {
    27 public:
    28 #include "xptcstubsdef.inc"
    29 };
    31 #undef STUB_ENTRY
    32 #undef SENTINEL_ENTRY
    34 #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
    35 #define STUB_ENTRY(n) NS_IMETHOD Stub##n();
    36 #else
    37 #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t);
    38 #endif
    40 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n();
    42 class nsXPTCStubBase MOZ_FINAL : public nsIXPTCStubBase
    43 {
    44 public:
    45     NS_DECL_ISUPPORTS_INHERITED
    47 #include "xptcstubsdef.inc"
    49     nsXPTCStubBase(nsIXPTCProxy* aOuter, xptiInterfaceEntry *aEntry) :
    50         mOuter(aOuter), mEntry(aEntry) { }
    52     nsIXPTCProxy*          mOuter;
    53     xptiInterfaceEntry*    mEntry;
    55     ~nsXPTCStubBase() { }
    56 };
    58 #undef STUB_ENTRY
    59 #undef SENTINEL_ENTRY
    61 #if defined(__clang__) || defined(__GNUC__)
    62 #define ATTRIBUTE_USED __attribute__ ((__used__))
    63 #else
    64 #define ATTRIBUTE_USED
    65 #endif
    67 #endif /* xptcprivate_h___ */

mercurial