-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from AjayBrahmakshatriya/master
Added support for passing arguments to lambda_wrapper and added corou…
- Loading branch information
Showing
7 changed files
with
25 additions
and
14 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
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
|
||
#include <functional> | ||
namespace builder { | ||
void lambda_wrapper_impl(void); | ||
void lambda_wrapper(void); | ||
void lambda_wrapper(std::function<void(void)>); | ||
void lambda_wrapper_close(void); | ||
void coroutine_wrapper(std::function<void(void)>); | ||
void coroutine_wrapper_close(void); | ||
|
||
int tail_call_guard; | ||
|
||
void lambda_wrapper(void) { | ||
lambda_wrapper_impl(); | ||
void lambda_wrapper(std::function<void(void)> f) { | ||
f(); | ||
tail_call_guard += 1; | ||
} | ||
void lambda_wrapper_close(void) {} | ||
|
||
|
||
void coroutine_wrapper(std::function<void(void)> f) { | ||
f(); | ||
tail_call_guard +=1; | ||
} | ||
void coroutine_wrapper_close(void) {} | ||
} // namespace builder |
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