summaryrefslogtreecommitdiffstats
path: root/base/bind_internal_win.h.pump
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 02:02:17 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-24 02:02:17 +0000
commitc18b1056be790c55f10e407a1f6a3706bff7df03 (patch)
tree7ed333791fc8dfeaef29c07307e8efcfa1b44fba /base/bind_internal_win.h.pump
parentb2e900f755ea4e66b5f41413716ecb55720e354d (diff)
downloadchromium_src-c18b1056be790c55f10e407a1f6a3706bff7df03.zip
chromium_src-c18b1056be790c55f10e407a1f6a3706bff7df03.tar.gz
chromium_src-c18b1056be790c55f10e407a1f6a3706bff7df03.tar.bz2
Callback support for unbound reference and array arguments.
Because the callback object uses const An& for the type of the Run() function in argument forwarding, the code breaks for An=T& or An=T[]. This CL adds in code to modify the parameter type to remove duplicate references, and other fun. BUG=35223 TEST=new unittests Review URL: http://codereview.chromium.org/6718021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79239 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/bind_internal_win.h.pump')
-rw-r--r--base/bind_internal_win.h.pump20
1 files changed, 20 insertions, 0 deletions
diff --git a/base/bind_internal_win.h.pump b/base/bind_internal_win.h.pump
index 4d213a3..06ceaca1 100644
--- a/base/bind_internal_win.h.pump
+++ b/base/bind_internal_win.h.pump
@@ -34,6 +34,16 @@ $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> {
typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
typedef false_type IsMethod;
+
+$if ARITY > 0 [[
+
+ // Target type for each bound parameter.
+
+$for ARG [[
+ typedef X$(ARG) B$(ARG);
+
+]] $$ for ARG
+]] $$ if ARITY > 0
};
// __fastcall Function: Arity $(ARITY).
@@ -42,6 +52,16 @@ $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> {
typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
typedef false_type IsMethod;
+
+$if ARITY > 0 [[
+
+ // Target type for each bound parameter.
+
+$for ARG [[
+ typedef X$(ARG) B$(ARG);
+
+]] $$ for ARG
+]] $$ if ARITY > 0
};
]] $$for ARITY