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

Side by Side Diff: swig/Lib/python/std_common.i

Issue 553095: Checkin swig binaries for win, linux and Mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: '' Created 10 years, 11 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 | « swig/Lib/python/std_char_traits.i ('k') | swig/Lib/python/std_complex.i » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 %include <std/std_except.i>
2 %include <pystdcommon.swg>
3
4
5 /*
6 Generate the traits for a 'primitive' type, such as 'double',
7 for which the SWIG_AsVal and SWIG_From methods are already defined.
8 */
9
10 %define %traits_ptypen(Type...)
11 %fragment(SWIG_Traits_frag(Type),"header",
12 fragment=SWIG_AsVal_frag(Type),
13 fragment=SWIG_From_frag(Type),
14 fragment="StdTraits") {
15 namespace swig {
16 template <> struct traits<Type > {
17 typedef value_category category;
18 static const char* type_name() { return #Type; }
19 };
20 template <> struct traits_asval<Type > {
21 typedef Type value_type;
22 static int asval(PyObject *obj, value_type *val) {
23 return SWIG_AsVal(Type)(obj, val);
24 }
25 };
26 template <> struct traits_from<Type > {
27 typedef Type value_type;
28 static PyObject *from(const value_type& val) {
29 return SWIG_From(Type)(val);
30 }
31 };
32 }
33 }
34 %enddef
35
36
37 %include <std/std_common.i>
38
39 //
40 // Generates the traits for all the known primitive
41 // C++ types (int, double, ...)
42 //
43 %apply_cpptypes(%traits_ptypen);
44
OLDNEW
« no previous file with comments | « swig/Lib/python/std_char_traits.i ('k') | swig/Lib/python/std_complex.i » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698