Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: base/bind_internal_win.h.pump

Issue 7015064: Support binding WeakPtr<> to methods with void return types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a few comments. Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/bind_internal_win.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 $$ This is a pump file for generating file templates. Pump is a python 1 $$ This is a pump file for generating file templates. Pump is a python
2 $$ script that is part of the Google Test suite of utilities. Description 2 $$ script that is part of the Google Test suite of utilities. Description
3 $$ can be found here: 3 $$ can be found here:
4 $$ 4 $$
5 $$ http://code.google.com/p/googletest/wiki/PumpManual 5 $$ http://code.google.com/p/googletest/wiki/PumpManual
6 $$ 6 $$
7 7
8 $var MAX_ARITY = 6 8 $var MAX_ARITY = 6
9 9
10 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 10 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
(...skipping 22 matching lines...) Expand all
33 $for ARITY [[ 33 $for ARITY [[
34 $range ARG 1..ARITY 34 $range ARG 1..ARITY
35 35
36 // __stdcall Function: Arity $(ARITY). 36 // __stdcall Function: Arity $(ARITY).
37 template <typename R[[]] 37 template <typename R[[]]
38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> 38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
39 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> { 39 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> {
40 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); 40 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
41 typedef false_type IsMethod; 41 typedef false_type IsMethod;
42 42
43 typedef R Return;
44
43 $if ARITY > 0 [[ 45 $if ARITY > 0 [[
44 46
45 // Target type for each bound parameter. 47 // Target type for each bound parameter.
46 48
47 $for ARG [[ 49 $for ARG [[
48 typedef X$(ARG) B$(ARG); 50 typedef X$(ARG) B$(ARG);
49 51
50 ]] $$ for ARG 52 ]] $$ for ARG
51 ]] $$ if ARITY > 0 53 ]] $$ if ARITY > 0
52 }; 54 };
53 55
54 // __fastcall Function: Arity $(ARITY). 56 // __fastcall Function: Arity $(ARITY).
55 template <typename R[[]] 57 template <typename R[[]]
56 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]> 58 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
57 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> { 59 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> {
58 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]); 60 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
59 typedef false_type IsMethod; 61 typedef false_type IsMethod;
60 62
63 typedef R Return;
64
61 $if ARITY > 0 [[ 65 $if ARITY > 0 [[
62 66
63 // Target type for each bound parameter. 67 // Target type for each bound parameter.
64 68
65 $for ARG [[ 69 $for ARG [[
66 typedef X$(ARG) B$(ARG); 70 typedef X$(ARG) B$(ARG);
67 71
68 ]] $$ for ARG 72 ]] $$ for ARG
69 ]] $$ if ARITY > 0 73 ]] $$ if ARITY > 0
70 }; 74 };
71 75
72 ]] $$for ARITY 76 ]] $$for ARITY
73 77
74 } // namespace internal 78 } // namespace internal
75 } // namespace base 79 } // namespace base
76 80
77 #endif // !defined(ARCH_CPU_X86_64) 81 #endif // !defined(ARCH_CPU_X86_64)
78 82
79 #endif // BASE_BIND_INTERNAL_WIN_H_ 83 #endif // BASE_BIND_INTERNAL_WIN_H_
OLDNEW
« no previous file with comments | « base/bind_internal_win.h ('k') | base/bind_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698