REGRESSION (r172532): JSBase.h declares NSMapTable functions that are SPI
https://bugs.webkit.org/show_bug.cgi?id=137170
<rdar://problem/18477384>
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
Move conditional include of header Foundation/NSMapTablePriv.h and forward declarations
of NSMapTable SPI from file JavaScriptCore/API/JSBase.h to WTF/wtf/spi/cocoa/NSMapTableSPI.h.
- API/JSBase.h:
- API/JSManagedValue.mm: Include header WTF/wtf/spi/cocoa/NSMapTableSPI.h.
- API/JSVirtualMachine.mm: Ditto.
- API/JSVirtualMachineInternal.h: Forward declare class NSMapTable.
- API/JSWrapperMap.mm: Include header WTF/wtf/spi/cocoa/NSMapTableSPI.h. Also, order
#include directives such that they are sorted in alphabetical order.
Source/WTF:
Add SPI wrapper header, NSMapTableSPI.h.
Additionally, define convenience macro EXTERN_C that can be used to specify the C linkage
convention for a declaration. For example, the declaration "EXTERN_C const int x;" will
expand to:
extern const int x;
and
extern "C" const int x;
when used in a C and C++ file, respectively.
- WTF.xcodeproj/project.pbxproj:
- wtf/Compiler.h:
- wtf/spi/cocoa/NSMapTableSPI.h: Added.