Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/initializer' into develop
* feature/initializer: Initializer functions
- Loading branch information
Showing
7 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
/* -*- coding: utf-8 -*- | |||
* ---------------------------------------------------------------------- | |||
* Copyright © 2012, RedJack, LLC. | |||
* All rights reserved. | |||
* | |||
* Please see the COPYING file in this distribution for license | |||
* details. | |||
* ---------------------------------------------------------------------- | |||
*/ | |||
|
|||
#include <stdio.h> | |||
|
|||
#include <libcork/core.h> | |||
|
|||
CORK_INITIALIZER(init) | |||
{ | |||
printf("Initializer 1\n"); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
/* -*- coding: utf-8 -*- | |||
* ---------------------------------------------------------------------- | |||
* Copyright © 2012, RedJack, LLC. | |||
* All rights reserved. | |||
* | |||
* Please see the COPYING file in this distribution for license | |||
* details. | |||
* ---------------------------------------------------------------------- | |||
*/ | |||
|
|||
#include <stdio.h> | |||
|
|||
#include <libcork/core.h> | |||
|
|||
CORK_INITIALIZER(init) | |||
{ | |||
printf("Initializer 2\n"); | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
/* -*- coding: utf-8 -*- | |||
* ---------------------------------------------------------------------- | |||
* Copyright © 2012, RedJack, LLC. | |||
* All rights reserved. | |||
* | |||
* Please see the COPYING file in this distribution for license | |||
* details. | |||
* ---------------------------------------------------------------------- | |||
*/ | |||
|
|||
int | |||
main(int argc, char **argv) | |||
{ | |||
return 0; | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,6 @@ | |||
We need to sort the output, since there's no guarantee about which order our | |||
initializer functions will run in. | |||
$ cork-initializer | sort | |||
Initializer 1 | |||
Initializer 2 |