Pavel3333 Posted May 15, 2018 Share Posted May 15, 2018 (edited) Сижу карпею над одним достаточно проблемным вопросом. Такой код работает: PyObject_CallMethodObjArgs(BigWorld, PyUnicode_FromString("delModel"), obj); А такой вызывает вылеты: PyObject* attribute = PyUnicode_FromString("delModel"); if(attribute == NULL) Py_RETURN_NONE; PyObject_CallMethodObjArgs(BigWorld, attribute, obj); Py_DECREF(attribute); Есть предложения? Edited May 15, 2018 by Pavel3333 @ Quote Link to comment Short link Share on other sites More sharing options...
SkepticalFox Posted May 15, 2018 Share Posted May 15, 2018 (edited) 2 hours ago, Pavel3333 said: Есть предложения? попробуй использовать Py_INCREF до PyObject_CallMethodObjArgs а вообще, если работает - не трогай) Edited May 15, 2018 by SkepticalFox @ Quote Link to comment Short link Share on other sites More sharing options...
Pavel3333 Posted May 15, 2018 Author Share Posted May 15, 2018 26 минут назад, SkepticalFox сказал: попробуй использовать Py_INCREF так-то вроде она уже инкрементирована после создания PyUnicodeString, сейчас гляну сорцы. 27 минут назад, SkepticalFox сказал: а вообще, если работает - не трогай) золотое правило любого радиотехника и вообще по жизни! но устранять краши можно только путем экспериментов и длительной отладки :) @ Quote Link to comment Short link Share on other sites More sharing options...
Mixaill Posted May 19, 2018 Share Posted May 19, 2018 Такая же проблема как и в двух других топиках: ванильные хидеры. @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.