Changeset 85521 in webkit


Ignore:
Timestamp:
May 2, 2011 2:13:00 PM (13 years ago)
Author:
xan@webkit.org
Message:

2011-05-02 Xan Lopez <xlopez@igalia.com>

Reviewed by Alexey Proskuryakov.

Use native NullPtr when using GCC 4.6.0 and C++0x
https://bugs.webkit.org/show_bug.cgi?id=59252

GCC 4.6.0 has nullptr support, use it when possible.

  • wtf/NullPtr.cpp: include config.h to pull in Platform.h before NullPtr.h, since we need the GCC_VERSION_AT_LEAST definition.
  • wtf/NullPtr.h: check for GCC >= 4.6.0 and C++0x in order to use native nullptr.
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r85497 r85521  
     12011-05-02  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Use native NullPtr when using GCC 4.6.0 and C++0x
     6        https://bugs.webkit.org/show_bug.cgi?id=59252
     7
     8        GCC 4.6.0 has nullptr support, use it when possible.
     9
     10        * wtf/NullPtr.cpp: include config.h to pull in Platform.h before
     11        NullPtr.h, since we need the GCC_VERSION_AT_LEAST definition.
     12        * wtf/NullPtr.h: check for GCC >= 4.6.0 and C++0x in order to
     13        use native nullptr.
     14
    1152011-05-02  Gavin Barraclough  <barraclough@apple.com>
    216
  • trunk/Source/JavaScriptCore/wtf/NullPtr.cpp

    r74695 r85521  
    2525*/
    2626
     27#include "config.h"
    2728#include "NullPtr.h"
    28 
    29 #include "Platform.h"
    3029
    3130#if !HAVE(NULLPTR)
  • trunk/Source/JavaScriptCore/wtf/NullPtr.h

    r74695 r85521  
    3636#endif
    3737
    38 #if __has_feature(cxx_nullptr) || (defined(_MSC_VER) && _MSC_VER >= 1600)
     38#if __has_feature(cxx_nullptr) || (GCC_VERSION_AT_LEAST(4, 6, 0) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && _MSC_VER >= 1600)
    3939
    4040#define HAVE_NULLPTR 1
Note: See TracChangeset for help on using the changeset viewer.