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:
Renato Filho 2011-05-18 15:27:41 -03:00 • committed by Hugo Parente Lima
commit 923d007ab9
3 changed files with 99 additions and 0 deletions

17
libpyside/pysideweakref.h Normal file
View 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