source:
doc/proposals/modules-gen-hdr/coop/egg.src.c
Last change on this file was b28ce93, checked in by , 3 months ago | |
---|---|
|
|
File size: 357 bytes |
Line | |
---|---|
1 | #import auto chicken |
2 | |
3 | //# @ |
4 | struct egg { |
5 | struct chicken hatchling; // not a pointer |
6 | struct chicken * layer; |
7 | }; |
8 | |
9 | //# $f |
10 | void ctor_egg( struct egg * this, struct chicken * layer ) { // handwritten |
11 | ctor_chicken( & this->hatchling, this ); |
12 | this->layer = layer; // ctor_pointer |
13 | } |
14 | |
15 | //# $f |
16 | void hatch( struct egg * this ) { |
17 | live( & this->hatchling ); |
18 | } |
Note:
See TracBrowser
for help on using the repository browser.