Commit bea4fbb0 authored by unknown's avatar unknown
Browse files

Rename rest() macro in my_list.h to list_rest(). (Bug #12327)


include/my_list.h:
  Rename rest() macro to list_rest().
mysys/list.c:
  rest() renamed to list_rest().
mysys/thr_lock.c:
  rest() renamed to list_rest().
sql/sql_test.cc:
  rest() renamed to list_rest().
parent 888a9314
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ extern void list_free(LIST *root,unsigned int free_data);
extern unsigned int list_length(LIST *);
extern int list_walk(LIST *,list_walk_action action,gptr argument);

#define rest(a) ((a)->next)
#define list_rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }

+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ int list_walk(LIST *list, list_walk_action action, gptr argument)
  {
    if ((error = (*action)(list->data,argument)))
      return error;
    list=rest(list);
    list=list_rest(list);
  }
  return 0;
}
+2 −1
Original line number Diff line number Diff line
@@ -1127,7 +1127,8 @@ void thr_print_locks(void)

  pthread_mutex_lock(&THR_LOCK_lock);
  puts("Current locks:");
  for (list=thr_lock_thread_list ; list && count++ < MAX_THREADS ; list=rest(list))
  for (list= thr_lock_thread_list; list && count++ < MAX_THREADS;
       list= list_rest(list))
  {
    THR_LOCK *lock=(THR_LOCK*) list->data;
    VOID(pthread_mutex_lock(&lock->mutex));
+1 −1
Original line number Diff line number Diff line
@@ -271,7 +271,7 @@ static void display_table_locks(void)

  VOID(my_init_dynamic_array(&saved_table_locks,sizeof(TABLE_LOCK_INFO),open_cache.records + 20,50));
  VOID(pthread_mutex_lock(&THR_LOCK_lock));
  for (list=thr_lock_thread_list ; list ; list=rest(list))
  for (list= thr_lock_thread_list; list; list= list_rest(list))
  {
    THR_LOCK *lock=(THR_LOCK*) list->data;