Skip to content

Callback: Deprecate attach member function in favor of simple assignment #3783

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

Merged
merged 2 commits into from
Feb 21, 2017

Conversation

geky
Copy link
Contributor

@geky geky commented Feb 15, 2017

The attach function is used several other places to indicate registration for interrupts. This differs significantly to its use in the Callback class. Additionally, the attach function is unnecessary given that simple assignment works just as well.

@pan-, I think this was being tracked in an issue of yours, but I can't find it now.

Hopefully we'll get a good chance to remove the bulk of these functions soon.

cc @pan-

geky added 2 commits February 15, 2017 15:07
…ment

The attach function is used several other places to indicate
registration for interrupts. This differs significantly to its use in
the Callback class. Additionally, the attach function is unnecessary
given that simple assignment works just as well.
@pan-
Copy link
Member

pan- commented Feb 16, 2017

@geky I'm not sure I've opened an issue for this item but I certainly spoke of it informally and I very much welcome such change. It makes a lot of sense to treat callable objects like regular function pointer from a semantic perspective.

@geky
Copy link
Contributor Author

geky commented Feb 16, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1614

All builds and test passed!

@sg- sg- removed the needs: review label Feb 17, 2017
@sg-
Copy link
Contributor

sg- commented Feb 17, 2017

/morph test-nightly

@mbed-bot
Copy link

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1633

Build failed!

@bridadan
Copy link
Contributor

/morph test-nightly

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 1641

All builds and test passed!

@bridadan
Copy link
Contributor

@geky just to clarify: this is deprecting the attach function for the Callback class only, correct? The mbed APIs will still support the attach function (Ticker for instance)?

@sg- sg- merged commit cfd517a into ARMmbed:master Feb 21, 2017
@geky
Copy link
Contributor Author

geky commented Feb 21, 2017

@geky just to clarify: this is deprecting the attach function for the Callback class only, correct?

Ah yes, this only effects the callback class (where attach behaved differently from other apis)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants