Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update Modules/_decimal/_decimal.c
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
  • Loading branch information
CharlieZhao95 and erlend-aasland authored Jun 27, 2023
commit 531bf03b84b550f5e49a5322b2462a5b63f453d0
9 changes: 4 additions & 5 deletions Modules/_decimal/_decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5834,11 +5834,10 @@ PyInit__decimal(void)


/* Init types */
#define CREATE_TYPE(mod, type, spec) \
do { \
type = (PyTypeObject *)PyType_FromMetaclass(NULL, mod, spec, NULL); \
CHECK_PTR(type); \
} while (0)
#define CREATE_TYPE(MOD, TP, SPEC) do { \
TP = (PyTypeObject *)PyType_FromMetaclass(NULL, MOD, SPEC, NULL); \
CHECK_PTR(TP); \
} while (0)

CREATE_TYPE(m, state->PyDec_Type, &dec_spec);
CREATE_TYPE(m, state->PyDecContext_Type, &context_spec);
Expand Down