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

Side by Side Diff: swig/Lib/typemaps/enumint.swg

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, 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
« no previous file with comments | « swig/Lib/typemaps/cwstring.swg ('k') | swig/Lib/typemaps/exception.swg » ('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 /* ------------------------------------------------------------
2 * Enums mapped as integer values
3 * ------------------------------------------------------------ */
4
5 %apply int { enum SWIGTYPE };
6 %apply const int& { const enum SWIGTYPE& };
7
8 %typemap(in,fragment=SWIG_AsVal_frag(int),noblock=1) const enum SWIGTYPE& (int v al, int ecode, $basetype temp) {
9 ecode = SWIG_AsVal(int)($input, &val);
10 if (!SWIG_IsOK(ecode)) {
11 %argument_fail(ecode, "$type", $symname, $argnum);
12 } else {
13 temp = %static_cast(val,$basetype);
14 $1 = &temp;
15 }
16 }
17
18 %typemap(varin,fragment=SWIG_AsVal_frag(int),noblock=1) enum SWIGTYPE {
19 if (sizeof(int) != sizeof($1)) {
20 %variable_fail(SWIG_AttributeError,"$type", "arch, read-only $name");
21 } else {
22 int ecode = SWIG_AsVal(int)($input, %reinterpret_cast(&$1,int*));
23 if (!SWIG_IsOK(ecode)) {
24 %variable_fail(ecode, "$type", "$name");
25 }
26 }
27 }
28
OLDNEW
« no previous file with comments | « swig/Lib/typemaps/cwstring.swg ('k') | swig/Lib/typemaps/exception.swg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698