root/trunk/infrastructure/pyd/generators/iterate.txt

Revision 38, 3.0 kB (checked in by KirkMcDonald, 2 years ago)

More opApply wrapping, docs

Line 
1         } else static if (ARGS == 2) {
2             foreach (a0, a1; t) {
3                 temp = _make_pytuple(_py(a0), _py(a1));
4                 if (temp is null) StackContext.throwYield(new DPyYield(null));
5                 StackContext.throwYield(new DPyYield(temp));
6             }
7         } else static if (ARGS == 3) {
8             foreach (a0, a1, a2; t) {
9                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2));
10                 if (temp is null) StackContext.throwYield(new DPyYield(null));
11                 StackContext.throwYield(new DPyYield(temp));
12             }
13         } else static if (ARGS == 4) {
14             foreach (a0, a1, a2, a3; t) {
15                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3));
16                 if (temp is null) StackContext.throwYield(new DPyYield(null));
17                 StackContext.throwYield(new DPyYield(temp));
18             }
19         } else static if (ARGS == 5) {
20             foreach (a0, a1, a2, a3, a4; t) {
21                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3), _py(a4));
22                 if (temp is null) StackContext.throwYield(new DPyYield(null));
23                 StackContext.throwYield(new DPyYield(temp));
24             }
25         } else static if (ARGS == 6) {
26             foreach (a0, a1, a2, a3, a4, a5; t) {
27                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3), _py(a4), _py(a5));
28                 if (temp is null) StackContext.throwYield(new DPyYield(null));
29                 StackContext.throwYield(new DPyYield(temp));
30             }
31         } else static if (ARGS == 7) {
32             foreach (a0, a1, a2, a3, a4, a5, a6; t) {
33                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3), _py(a4), _py(a5), _py(a6));
34                 if (temp is null) StackContext.throwYield(new DPyYield(null));
35                 StackContext.throwYield(new DPyYield(temp));
36             }
37         } else static if (ARGS == 8) {
38             foreach (a0, a1, a2, a3, a4, a5, a6, a7; t) {
39                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3), _py(a4), _py(a5), _py(a6), _py(a7));
40                 if (temp is null) StackContext.throwYield(new DPyYield(null));
41                 StackContext.throwYield(new DPyYield(temp));
42             }
43         } else static if (ARGS == 9) {
44             foreach (a0, a1, a2, a3, a4, a5, a6, a7, a8; t) {
45                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3), _py(a4), _py(a5), _py(a6), _py(a7), _py(a8));
46                 if (temp is null) StackContext.throwYield(new DPyYield(null));
47                 StackContext.throwYield(new DPyYield(temp));
48             }
49         } else static if (ARGS == 10) {
50             foreach (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9; t) {
51                 temp = _make_pytuple(_py(a0), _py(a1), _py(a2), _py(a3), _py(a4), _py(a5), _py(a6), _py(a7), _py(a8), _py(a9));
52                 if (temp is null) StackContext.throwYield(new DPyYield(null));
53                 StackContext.throwYield(new DPyYield(temp));
54             }
55         }
Note: See TracBrowser for help on using the browser.