Skip to content
Prev Previous commit
Next Next commit
Clean up the nb_info struct
  • Loading branch information
brandtbucher committed Oct 28, 2021
commit f6970361d8cf80000a08e4e6c7d809bd439c8874
10 changes: 5 additions & 5 deletions Objects/abstract.c
Original file line number Diff line number Diff line change
Expand Up @@ -1716,14 +1716,14 @@ PyNumber_ToBase(PyObject *n, int base)
}

typedef struct {
const char *name;
size_t slot;
const char *iname;
size_t islot;
const int slot;
const char name[3];
Comment thread
brandtbucher marked this conversation as resolved.
Outdated
const int islot;
const char iname[4];
} nb_info;
Comment thread
brandtbucher marked this conversation as resolved.
Outdated

#define NB_INFO(name, slot) \
{name, NB_SLOT(nb_##slot), name "=", NB_SLOT(nb_inplace_##slot)}
{NB_SLOT(nb_##slot), name, NB_SLOT(nb_inplace_##slot), name "="}

static nb_info nb_infos[] = {
[NB_AND] = NB_INFO("&", and),
Expand Down