Skip to content

Rename callback -> mbed_callback #2663

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions TESTS/mbed_functional/callback/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ void test_dispatch0() {
Verifier<T>::verify0((const Thing<T>*)&thing, &const_void_func0<T>);
Verifier<T>::verify0((volatile Thing<T>*)&thing, &volatile_void_func0<T>);
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &const_volatile_void_func0<T>);
Verifier<T>::verify0(callback(static_func0<T>));
Verifier<T>::verify0(mbed_callback(static_func0<T>));

Callback<T()> cb(static_func0);
Verifier<T>::verify0(cb);
Expand All @@ -355,7 +355,7 @@ void test_dispatch1() {
Verifier<T>::verify1((const Thing<T>*)&thing, &const_void_func1<T>);
Verifier<T>::verify1((volatile Thing<T>*)&thing, &volatile_void_func1<T>);
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &const_volatile_void_func1<T>);
Verifier<T>::verify1(callback(static_func1<T>));
Verifier<T>::verify1(mbed_callback(static_func1<T>));

Callback<T(T)> cb(static_func1);
Verifier<T>::verify1(cb);
Expand All @@ -382,7 +382,7 @@ void test_dispatch2() {
Verifier<T>::verify2((const Thing<T>*)&thing, &const_void_func2<T>);
Verifier<T>::verify2((volatile Thing<T>*)&thing, &volatile_void_func2<T>);
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &const_volatile_void_func2<T>);
Verifier<T>::verify2(callback(static_func2<T>));
Verifier<T>::verify2(mbed_callback(static_func2<T>));

Callback<T(T, T)> cb(static_func2);
Verifier<T>::verify2(cb);
Expand All @@ -409,7 +409,7 @@ void test_dispatch3() {
Verifier<T>::verify3((const Thing<T>*)&thing, &const_void_func3<T>);
Verifier<T>::verify3((volatile Thing<T>*)&thing, &volatile_void_func3<T>);
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &const_volatile_void_func3<T>);
Verifier<T>::verify3(callback(static_func3<T>));
Verifier<T>::verify3(mbed_callback(static_func3<T>));

Callback<T(T, T, T)> cb(static_func3);
Verifier<T>::verify3(cb);
Expand All @@ -436,7 +436,7 @@ void test_dispatch4() {
Verifier<T>::verify4((const Thing<T>*)&thing, &const_void_func4<T>);
Verifier<T>::verify4((volatile Thing<T>*)&thing, &volatile_void_func4<T>);
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &const_volatile_void_func4<T>);
Verifier<T>::verify4(callback(static_func4<T>));
Verifier<T>::verify4(mbed_callback(static_func4<T>));

Callback<T(T, T, T, T)> cb(static_func4);
Verifier<T>::verify4(cb);
Expand All @@ -463,7 +463,7 @@ void test_dispatch5() {
Verifier<T>::verify5((const Thing<T>*)&thing, &const_void_func5<T>);
Verifier<T>::verify5((volatile Thing<T>*)&thing, &volatile_void_func5<T>);
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &const_volatile_void_func5<T>);
Verifier<T>::verify5(callback(static_func5<T>));
Verifier<T>::verify5(mbed_callback(static_func5<T>));

Callback<T(T, T, T, T, T)> cb(static_func5);
Verifier<T>::verify5(cb);
Expand Down
12 changes: 6 additions & 6 deletions TESTS/mbed_functional/callback_big/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void test_dispatch0() {
Verifier<T>::verify0((const Thing<T>*)&thing, &const_func0<T>);
Verifier<T>::verify0((volatile Thing<T>*)&thing, &volatile_func0<T>);
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &const_volatile_func0<T>);
Verifier<T>::verify0(callback(static_func0<T>));
Verifier<T>::verify0(mbed_callback(static_func0<T>));

Callback<T()> cb(static_func0);
Verifier<T>::verify0(cb);
Expand All @@ -225,7 +225,7 @@ void test_dispatch1() {
Verifier<T>::verify1((const Thing<T>*)&thing, &const_func1<T>);
Verifier<T>::verify1((volatile Thing<T>*)&thing, &volatile_func1<T>);
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &const_volatile_func1<T>);
Verifier<T>::verify1(callback(static_func1<T>));
Verifier<T>::verify1(mbed_callback(static_func1<T>));

Callback<T(T)> cb(static_func1);
Verifier<T>::verify1(cb);
Expand All @@ -248,7 +248,7 @@ void test_dispatch2() {
Verifier<T>::verify2((const Thing<T>*)&thing, &const_func2<T>);
Verifier<T>::verify2((volatile Thing<T>*)&thing, &volatile_func2<T>);
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &const_volatile_func2<T>);
Verifier<T>::verify2(callback(static_func2<T>));
Verifier<T>::verify2(mbed_callback(static_func2<T>));

Callback<T(T, T)> cb(static_func2);
Verifier<T>::verify2(cb);
Expand All @@ -271,7 +271,7 @@ void test_dispatch3() {
Verifier<T>::verify3((const Thing<T>*)&thing, &const_func3<T>);
Verifier<T>::verify3((volatile Thing<T>*)&thing, &volatile_func3<T>);
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &const_volatile_func3<T>);
Verifier<T>::verify3(callback(static_func3<T>));
Verifier<T>::verify3(mbed_callback(static_func3<T>));

Callback<T(T, T, T)> cb(static_func3);
Verifier<T>::verify3(cb);
Expand All @@ -294,7 +294,7 @@ void test_dispatch4() {
Verifier<T>::verify4((const Thing<T>*)&thing, &const_func4<T>);
Verifier<T>::verify4((volatile Thing<T>*)&thing, &volatile_func4<T>);
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &const_volatile_func4<T>);
Verifier<T>::verify4(callback(static_func4<T>));
Verifier<T>::verify4(mbed_callback(static_func4<T>));

Callback<T(T, T, T, T)> cb(static_func4);
Verifier<T>::verify4(cb);
Expand All @@ -317,7 +317,7 @@ void test_dispatch5() {
Verifier<T>::verify5((const Thing<T>*)&thing, &const_func5<T>);
Verifier<T>::verify5((volatile Thing<T>*)&thing, &volatile_func5<T>);
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &const_volatile_func5<T>);
Verifier<T>::verify5(callback(static_func5<T>));
Verifier<T>::verify5(mbed_callback(static_func5<T>));

Callback<T(T, T, T, T, T)> cb(static_func5);
Verifier<T>::verify5(cb);
Expand Down
12 changes: 6 additions & 6 deletions TESTS/mbed_functional/callback_small/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ void test_dispatch0() {
Verifier<T>::verify0((const Thing<T>*)&thing, &const_func0<T>);
Verifier<T>::verify0((volatile Thing<T>*)&thing, &volatile_func0<T>);
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &const_volatile_func0<T>);
Verifier<T>::verify0(callback(static_func0<T>));
Verifier<T>::verify0(mbed_callback(static_func0<T>));

Callback<T()> cb(static_func0);
Verifier<T>::verify0(cb);
Expand All @@ -225,7 +225,7 @@ void test_dispatch1() {
Verifier<T>::verify1((const Thing<T>*)&thing, &const_func1<T>);
Verifier<T>::verify1((volatile Thing<T>*)&thing, &volatile_func1<T>);
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &const_volatile_func1<T>);
Verifier<T>::verify1(callback(static_func1<T>));
Verifier<T>::verify1(mbed_callback(static_func1<T>));

Callback<T(T)> cb(static_func1);
Verifier<T>::verify1(cb);
Expand All @@ -248,7 +248,7 @@ void test_dispatch2() {
Verifier<T>::verify2((const Thing<T>*)&thing, &const_func2<T>);
Verifier<T>::verify2((volatile Thing<T>*)&thing, &volatile_func2<T>);
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &const_volatile_func2<T>);
Verifier<T>::verify2(callback(static_func2<T>));
Verifier<T>::verify2(mbed_callback(static_func2<T>));

Callback<T(T, T)> cb(static_func2);
Verifier<T>::verify2(cb);
Expand All @@ -271,7 +271,7 @@ void test_dispatch3() {
Verifier<T>::verify3((const Thing<T>*)&thing, &const_func3<T>);
Verifier<T>::verify3((volatile Thing<T>*)&thing, &volatile_func3<T>);
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &const_volatile_func3<T>);
Verifier<T>::verify3(callback(static_func3<T>));
Verifier<T>::verify3(mbed_callback(static_func3<T>));

Callback<T(T, T, T)> cb(static_func3);
Verifier<T>::verify3(cb);
Expand All @@ -294,7 +294,7 @@ void test_dispatch4() {
Verifier<T>::verify4((const Thing<T>*)&thing, &const_func4<T>);
Verifier<T>::verify4((volatile Thing<T>*)&thing, &volatile_func4<T>);
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &const_volatile_func4<T>);
Verifier<T>::verify4(callback(static_func4<T>));
Verifier<T>::verify4(mbed_callback(static_func4<T>));

Callback<T(T, T, T, T)> cb(static_func4);
Verifier<T>::verify4(cb);
Expand All @@ -317,7 +317,7 @@ void test_dispatch5() {
Verifier<T>::verify5((const Thing<T>*)&thing, &const_func5<T>);
Verifier<T>::verify5((volatile Thing<T>*)&thing, &volatile_func5<T>);
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &const_volatile_func5<T>);
Verifier<T>::verify5(callback(static_func5<T>));
Verifier<T>::verify5(mbed_callback(static_func5<T>));

Callback<T(T, T, T, T, T)> cb(static_func5);
Verifier<T>::verify5(cb);
Expand Down
4 changes: 2 additions & 2 deletions features/net/network-socket/Socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ class Socket {
template <typename T, typename M>
MBED_DEPRECATED_SINCE("mbed-os-5.1",
"The attach function does not support cv-qualifiers. Replaced by "
"attach(callback(obj, method)).")
"attach(mbed_callback(obj, method)).")
void attach(T *obj, M method) {
attach(mbed::callback(obj, method));
attach(mbed::mbed_callback(obj, method));
}

protected:
Expand Down
Loading