Hello,

I've made some changes to the webkit trunk that allows me to build webkit
(more specifically QtWebkit) with Visual Studio 2010. I had to make several
changes to handle the ambiguous operator = error from NullPtr.h.

To get the build to work I made two primary changes:

First, NullPtr.h

#ifndef NullPtr_h
#define NullPtr_h

// For compilers and standard libraries that do not yet include it, this
adds the
// nullptr_t type and nullptr object. They are defined in the same
namespaces they
// would be in compiler and library that had the support.

#if !defined(_MSC_VER)
#ifndef __has_feature
    #define __has_feature(feature) 0
#endif

#if !__has_feature(cxx_nullptr)

namespace std {
    class nullptr_t { };
}

extern std::nullptr_t nullptr;

#endif

#elseif  _MSC_VER < 1600

//to maintain compatibility with previous versions of msvc
#ifndef nullptr
#define nullptr 0
#endif

#endif //_MSC_VER

#endif


And secondly I changed all = 0 errors to = nullptr (approximately 450
instances).

My question is, does this look like a sound approach? If so, I'll submit a
patch.

Thanks,
-Jake Helfert
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to