Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate null funcs #295

Merged
merged 9 commits into from
Mar 27, 2019
Merged

generate null funcs #295

merged 9 commits into from
Mar 27, 2019

Conversation

xmclark
Copy link
Contributor

@xmclark xmclark commented Mar 27, 2019

This PR automates adding the nullfunc imports. A new macro is added to help working with namespaces. All functions in the env namespace that start with nullFunc_ will be added to the import object. This is easy because all null funcs have the same expected signature.

@xmclark
Copy link
Contributor Author

xmclark commented Mar 27, 2019

bors try

bors bot added a commit that referenced this pull request Mar 27, 2019
@bors
Copy link
Contributor

bors bot commented Mar 27, 2019


#[macro_export]
#[doc(hidden)]
macro_rules! ecapseman {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does ecapseman mean?

import_object
}

pub fn nullfunc_x(ctx: &mut Ctx, _x: u32) {
Copy link
Member

@syrusakbary syrusakbary Mar 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be just nullfunc? (without an x)

pub fn nullfunc(ctx: &mut Ctx) {
    ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, sound good

@syrusakbary
Copy link
Member

bors r+

bors bot added a commit that referenced this pull request Mar 27, 2019
295: generate null funcs r=syrusakbary a=xmclark

This PR automates adding the `nullfunc` imports. A new macro is added to help working with namespaces. All functions in the env namespace that start with `nullFunc_` will be added to the import object. This is easy because *all* null funcs have the same expected signature. 

Co-authored-by: Mackenzie Clark <mackenzie.a.z.c@gmail.com>
@bors
Copy link
Contributor

bors bot commented Mar 27, 2019

@bors bors bot merged commit cd119fc into master Mar 27, 2019
@bors bors bot deleted the feature/generate-nullfuncs branch March 27, 2019 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants