Skip to content

Commit 7f56e58

Browse files
committed
Update main.c
1 parent 00ad0ce commit 7f56e58

File tree

1 file changed

+2
-2
lines changed
  • examples/02 Casting Types

1 file changed

+2
-2
lines changed

examples/02 Casting Types/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ int main() {
1111

1212
// int
1313
py_newint(py_r1(), 10);
14-
int int_ = py_toint(py_r0());
14+
int int_ = py_toint(py_r1());
1515
printf("int: %d\n", int_);
1616

1717
// float
1818
py_newfloat(py_r2(), 10.5);
19-
float float_ = py_tofloat(py_r0());
19+
float float_ = py_tofloat(py_r2());
2020
printf("float: %f\n", float_);
2121

2222
// tuple (r3)

0 commit comments

Comments
 (0)