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

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

Issue 6561004: Callback support for __fastcall and __stdcall functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: endif Created 9 years, 10 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
OLDNEW
(Empty)
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
3 $$ can be found here:
4 $$
5 $$ http://code.google.com/p/googletest/wiki/PumpManual
6 $$
7
8 $var MAX_ARITY = 6
9
10 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
11 // Use of this source code is governed by a BSD-style license that can be
12 // found in the LICENSE file.
13
14 // Specializations of FunctionTraits<> for Windows specific calling
15 // conventions. Please see base/bind_internal.h for more info.
16
17 #ifndef BASE_BIND_INTERNAL_WIN_H_
18 #define BASE_BIND_INTERNAL_WIN_H_
19 #pragma once
20
21 namespace base {
22 namespace internal {
23
24 $range ARITY 0..MAX_ARITY
25 $for ARITY [[
26 $range ARG 1..ARITY
27
28 // __stdcall Function: Arity $(ARITY).
29 template <typename R[[]]
30 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
31 struct FunctionTraits<R(__stdcall *)($for ARG , [[X$(ARG)]])> {
32 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
33 typedef false_type IsMethod;
34 };
35
36 // __fastcall Function: Arity $(ARITY).
37 template <typename R[[]]
38 $if ARITY > 0[[, ]] $for ARG , [[typename X$(ARG)]]>
39 struct FunctionTraits<R(__fastcall *)($for ARG , [[X$(ARG)]])> {
40 typedef R (*NormalizedSig)($for ARG , [[X$(ARG)]]);
41 typedef false_type IsMethod;
42 };
43
44 ]] $$for ARITY
45
46 } // namespace internal
47 } // namespace base
48
49 #endif // BASE_BIND_INTERNAL_WIN_H_
OLDNEW
« base/bind_internal.h ('K') | « 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