@@ -36,10 +36,10 @@ static int SdBus_init(SdBusObject* self, PyObject* Py_UNUSED(args), PyObject* Py
3636#ifndef Py_LIMITED_API
3737static SdBusMessageObject * SdBus_new_method_call_message (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
3838 SD_BUS_PY_CHECK_ARGS_NUMBER (4 );
39- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
40- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyUnicode_Type );
41- SD_BUS_PY_CHECK_ARG_TYPE (2 , PyUnicode_Type );
42- SD_BUS_PY_CHECK_ARG_TYPE (3 , PyUnicode_Type );
39+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
40+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyUnicode_Check );
41+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (2 , PyUnicode_Check );
42+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (3 , PyUnicode_Check );
4343
4444 const char * destination_bus_name = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
4545 const char * object_path = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [1 ]);
@@ -66,10 +66,10 @@ static SdBusMessageObject* SdBus_new_method_call_message(SdBusObject* self, PyOb
6666#ifndef Py_LIMITED_API
6767static SdBusMessageObject * SdBus_new_property_get_message (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
6868 SD_BUS_PY_CHECK_ARGS_NUMBER (4 );
69- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
70- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyUnicode_Type );
71- SD_BUS_PY_CHECK_ARG_TYPE (2 , PyUnicode_Type );
72- SD_BUS_PY_CHECK_ARG_TYPE (3 , PyUnicode_Type );
69+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
70+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyUnicode_Check );
71+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (2 , PyUnicode_Check );
72+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (3 , PyUnicode_Check );
7373
7474 const char * destination_service_name = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
7575 const char * object_path = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [1 ]);
@@ -99,10 +99,10 @@ static SdBusMessageObject* SdBus_new_property_get_message(SdBusObject* self, PyO
9999#ifndef Py_LIMITED_API
100100static SdBusMessageObject * SdBus_new_property_set_message (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
101101 SD_BUS_PY_CHECK_ARGS_NUMBER (4 );
102- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
103- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyUnicode_Type );
104- SD_BUS_PY_CHECK_ARG_TYPE (2 , PyUnicode_Type );
105- SD_BUS_PY_CHECK_ARG_TYPE (3 , PyUnicode_Type );
102+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
103+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyUnicode_Check );
104+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (2 , PyUnicode_Check );
105+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (3 , PyUnicode_Check );
106106
107107 const char * destination_service_name = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
108108 const char * object_path = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [1 ]);
@@ -132,9 +132,9 @@ static SdBusMessageObject* SdBus_new_property_set_message(SdBusObject* self, PyO
132132#ifndef Py_LIMITED_API
133133static SdBusMessageObject * SdBus_new_signal_message (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
134134 SD_BUS_PY_CHECK_ARGS_NUMBER (3 );
135- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type ); // Path
136- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyUnicode_Type ); // Interface
137- SD_BUS_PY_CHECK_ARG_TYPE (2 , PyUnicode_Type ); // Member
135+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check ); // Path
136+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyUnicode_Check ); // Interface
137+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (2 , PyUnicode_Check ); // Member
138138
139139 const char * object_path = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
140140 const char * interface_name = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [1 ]);
@@ -352,8 +352,8 @@ static int _check_is_sdbus_interface(PyObject* type_to_check) {
352352static PyObject * SdBus_add_interface (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
353353 SD_BUS_PY_CHECK_ARGS_NUMBER (3 );
354354 SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , _check_is_sdbus_interface );
355- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyUnicode_Type );
356- SD_BUS_PY_CHECK_ARG_TYPE (2 , PyUnicode_Type );
355+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyUnicode_Check );
356+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (2 , PyUnicode_Check );
357357
358358 SdBusInterfaceObject * interface_object = (SdBusInterfaceObject * )args [0 ];
359359 const char * path_char_ptr = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [1 ]);
@@ -497,8 +497,8 @@ int SdBus_request_callback(sd_bus_message* m,
497497#ifndef Py_LIMITED_API
498498static PyObject * SdBus_request_name_async (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
499499 SD_BUS_PY_CHECK_ARGS_NUMBER (2 );
500- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
501- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyLong_Type );
500+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
501+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyLong_Check );
502502
503503 const char * service_name_char_ptr = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
504504 uint64_t flags = PyLong_AsUnsignedLongLong (args [1 ]);
@@ -529,8 +529,8 @@ static PyObject* SdBus_request_name_async(SdBusObject* self, PyObject* args) {
529529#ifndef Py_LIMITED_API
530530static PyObject * SdBus_request_name (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
531531 SD_BUS_PY_CHECK_ARGS_NUMBER (2 );
532- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
533- SD_BUS_PY_CHECK_ARG_TYPE (1 , PyLong_Type );
532+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
533+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (1 , PyLong_Check );
534534
535535 const char * service_name_char_ptr = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
536536 uint64_t flags = PyLong_AsUnsignedLongLong (args [1 ]);
@@ -551,7 +551,7 @@ static PyObject* SdBus_request_name(SdBusObject* self, PyObject* args) {
551551#ifndef Py_LIMITED_API
552552static SdBusSlotObject * SdBus_add_object_manager (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
553553 SD_BUS_PY_CHECK_ARGS_NUMBER (1 );
554- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
554+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
555555
556556 const char * object_manager_path = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
557557#else
@@ -570,7 +570,7 @@ static SdBusSlotObject* SdBus_add_object_manager(SdBusObject* self, PyObject* ar
570570#ifndef Py_LIMITED_API
571571static PyObject * SdBus_emit_object_added (SdBusObject * self , PyObject * const * args , Py_ssize_t nargs ) {
572572 SD_BUS_PY_CHECK_ARGS_NUMBER (1 );
573- SD_BUS_PY_CHECK_ARG_TYPE (0 , PyUnicode_Type );
573+ SD_BUS_PY_CHECK_ARG_CHECK_FUNC (0 , PyUnicode_Check );
574574
575575 const char * added_object_path = SD_BUS_PY_UNICODE_AS_CHAR_PTR (args [0 ]);
576576#else
0 commit comments