Skip to content

Commit 7484598

Browse files
committed
py/runtime: Rename mp_handle_pending_internal to mp_handle_pending.
This commit removes the static-inline `mp_handle_pending()` wrapper function, which was originally added for backwards compatibility. It replaces it with `mp_handle_pending_internal()` which is renamed to `mp_handle_pending()`, which has the same arguments. Signed-off-by: Damien George <damien@micropython.org>
1 parent 2984574 commit 7484598

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

py/runtime.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,7 @@ void mp_sched_keyboard_interrupt(void);
108108
void mp_sched_vm_abort(void);
109109
#endif
110110

111-
void mp_handle_pending_internal(mp_handle_pending_behaviour_t behavior);
112-
113-
static inline void mp_handle_pending(bool raise_exc) {
114-
mp_handle_pending_internal(raise_exc ?
115-
MP_HANDLE_PENDING_CALLBACKS_AND_EXCEPTIONS :
116-
MP_HANDLE_PENDING_CALLBACKS_AND_CLEAR_EXCEPTIONS);
117-
}
111+
void mp_handle_pending(mp_handle_pending_behaviour_t behavior);
118112

119113
#if MICROPY_ENABLE_SCHEDULER
120114
void mp_sched_lock(void);

py/scheduler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ MP_REGISTER_ROOT_POINTER(mp_sched_item_t sched_queue[MICROPY_SCHEDULER_DEPTH]);
213213

214214
// Called periodically from the VM or from "waiting" code (e.g. sleep) to
215215
// process background tasks and pending exceptions (e.g. KeyboardInterrupt).
216-
void mp_handle_pending_internal(mp_handle_pending_behaviour_t behavior) {
216+
void mp_handle_pending(mp_handle_pending_behaviour_t behavior) {
217217
bool handle_exceptions = (behavior != MP_HANDLE_PENDING_CALLBACKS_ONLY);
218218
bool raise_exceptions = (behavior == MP_HANDLE_PENDING_CALLBACKS_AND_EXCEPTIONS);
219219

0 commit comments

Comments
 (0)