diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-27 01:25:59 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-27 01:25:59 +0000 |
commit | 054ac754be8bcdecd3f1a39a085f01ef5c5d379a (patch) | |
tree | e713bfa32a32f74e3bb7d93af58e08ced826c075 /base/bind_internal.h.pump | |
parent | 8cf26423f5e01f1e25b66b126f9bf102b726b8ba (diff) | |
download | chromium_src-054ac754be8bcdecd3f1a39a085f01ef5c5d379a.zip chromium_src-054ac754be8bcdecd3f1a39a085f01ef5c5d379a.tar.gz chromium_src-054ac754be8bcdecd3f1a39a085f01ef5c5d379a.tar.bz2 |
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
Diffstat (limited to 'base/bind_internal.h.pump')
-rw-r--r-- | base/bind_internal.h.pump | 11 |
1 files changed, 8 insertions, 3 deletions
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 @@ $var MAX_ARITY = 6 #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 @@ template <typename R[[]] $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 @@ template <typename R, typename T[[]] $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 @@ template <typename R, typename T[[]] $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 |