Jump to content
Korean Random
Pavel3333

Краш при вызове Py_RETURN_NONE

Recommended Posts

Имеется следующий код:

static PyObject* trj_test(PyObject *self, PyObject *args)
{
	Py_RETURN_NONE;
};

При вызове крашит клиент.

Следующий код не крашит:

static PyObject* trj_test(PyObject *self, PyObject *args)
{
	return Py_BuildValue("");
};

Вопрос: где логика? почему краш?

@Mixaill, прошу помощи.

Edited by Pavel3333

Share this post


Link to post

Short link
Share on other sites
2 hours ago, Pavel3333 said:

Вопрос: где логика? почему краш?

может снова смещения съехали...

Share this post


Link to post

Short link
Share on other sites

@SkepticalFox наверняка. Попользуюсь пока Py_BuildValue(""), хотя в душе перфекционист и противно юзать то, что медленнее существующей альтернативы.

Edited by Pavel3333

Share this post


Link to post

Short link
Share on other sites

Судя по соседнему треду, ты используешь родные хидеры вместо комплектных от XFW.Native

Edited by Mixaill

Share this post


Link to post

Short link
Share on other sites
4 часа назад, Mixaill сказал:

комплектных от XFW.Native

А они где-то имеются??? O_o

Ни разу не видел папок Include в ваших репозиториях

PS Нашел, спасибо

PPS: Скомпилил с хедерами, ЗАРАБОТАЛО! крашей нет!

:great:

Share this post


Link to post

Short link
Share on other sites

На bitbucket.org есть специальный архив с суффиксом -devel специально для этих целей.

Share this post


Link to post

Short link
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...