From f07234bf285d12eb8e0edf324367cf2e9f00fef7 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 7 Jun 2017 15:28:46 +0200 Subject: [PATCH] py3: support of Python 3.4 --- .../templateClassPyExport.py | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/Tools/generateTemplates/templateClassPyExport.py b/src/Tools/generateTemplates/templateClassPyExport.py index 632b7cf1f4..cf5474df27 100644 --- a/src/Tools/generateTemplates/templateClassPyExport.py +++ b/src/Tools/generateTemplates/templateClassPyExport.py @@ -398,24 +398,27 @@ PyNumberMethods @self.export.Name@::Number[] = { { number_oct_handler, number_hex_handler, #endif - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL -#if PY_MAJOR_VERSION >= 3 - ,NULL /*nb_inplace_matrix_multiply*/ + NULL, /*nb_inplace_add*/ + NULL, /*nb_inplace_subtract*/ + NULL, /*nb_inplace_multiply*/ +#if PY_MAJOR_VERSION < 3 + NULL, /*nb_inplace_divide*/ +#endif + NULL, /*nb_inplace_remainder*/ + NULL, /*nb_inplace_power*/ + NULL, /*nb_inplace_lshift*/ + NULL, /*nb_inplace_rshift*/ + NULL, /*nb_inplace_and*/ + NULL, /*nb_inplace_xor*/ + NULL, /*nb_inplace_or*/ + NULL, /*nb_floor_divide*/ + NULL, /*nb_true_divide*/ + NULL, /*nb_inplace_floor_divide*/ + NULL, /*nb_inplace_true_divide*/ + NULL /*nb_index*/ +#if PY_VERSION_HEX >= 0x03050000 + ,NULL /*nb_matrix_multiply*/ + ,NULL /*nb_inplace_matrix_multiply*/ #endif } }; -