REGRESSION (r172532): JSBase.h declares NSMapTable functions that are SPI
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Sep 2014 18:40:32 +0000 (18:40 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Sep 2014 18:40:32 +0000 (18:40 +0000)
commitab96603210ee0774aa0d9ad3b5035f43d43c97fc
treeac8cbe4fe5bc53cb325b08c3ea0612cc0d2eb59f
parent3369b6236486aa9af6ae4d1cb268e8848812f11e
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@174110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/API/JSBase.h
Source/JavaScriptCore/API/JSManagedValue.mm
Source/JavaScriptCore/API/JSVirtualMachine.mm
Source/JavaScriptCore/API/JSVirtualMachineInternal.h
Source/JavaScriptCore/API/JSWrapperMap.mm
Source/JavaScriptCore/ChangeLog
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/Compiler.h
Source/WTF/wtf/spi/cocoa/NSMapTableSPI.h [new file with mode: 0644]