Create PySideWeakRef class.
With this class you can use a c function as a callback on PyObject destruction.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
parent
21b5e6f05a
commit
923d007ab9
3 changed files with 99 additions and 0 deletions
17
libpyside/pysideweakref.h
Normal file
17
libpyside/pysideweakref.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef __PYSIDEWEAKREF__
|
||||
#define __PYSIDEWEAKREF__
|
||||
|
||||
#include <pysidemacros.h>
|
||||
#include <Python.h>
|
||||
|
||||
typedef void (*PySideWeakRefFunction)(void* userData);
|
||||
|
||||
namespace PySide { namespace WeakRef {
|
||||
|
||||
PYSIDE_API PyObject* create(PyObject* ob, PySideWeakRefFunction func, void* userData);
|
||||
|
||||
} //PySide
|
||||
} //WeakRef
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue