Callback support for __fastcall and __stdcall functions.
Create FunctionTraits specializations that can unwrap function pointers that
are delcared with __fastcall and __stdcall on windows.
Only include these in the Windows build.
BUG=35223
TEST=new unittests
Review URL: http://codereview.chromium.org/6561004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76174 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 054ac754be8bcdecd3f1a39a085f01ef5c5d379a
diff --git a/base/bind_internal.h.pump b/base/bind_internal.h.pump
index b1ba2d7..84fb2ef 100644
--- a/base/bind_internal.h.pump
+++ b/base/bind_internal.h.pump
@@ -18,6 +18,11 @@
#include "base/bind_helpers.h"
#include "base/callback_internal.h"
#include "base/template_util.h"
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
+#include "base/bind_internal_win.h"
+#endif
namespace base {
namespace internal {
@@ -76,7 +81,7 @@
$if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
struct FunctionTraits<R(*)($for ARG , [[X$(ARG)]])> {
typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
- typedef base::false_type IsMethod;
+ typedef false_type IsMethod;
};
// Method: Arity $(ARITY).
@@ -84,7 +89,7 @@
$if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
struct FunctionTraits<R(T::*)($for ARG , [[X$(ARG)]])> {
typedef R (T::*NormalizedSig)($for ARG , [[X$(ARG)]]);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
// Const Method: Arity $(ARITY).
@@ -92,7 +97,7 @@
$if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
struct FunctionTraits<R(T::*)($for ARG , [[X$(ARG)]]) const> {
typedef R (T::*NormalizedSig)($for ARG , [[X$(ARG)]]);
- typedef base::true_type IsMethod;
+ typedef true_type IsMethod;
};
]] $$for ARITY