declare some PyCXX functions for export, add PyCXX wrapper for Vector2dPy class
This commit is contained in:
parent
cdf45248dc
commit
95768acf65
|
@ -108,7 +108,7 @@ Vector2dPy::~Vector2dPy()
|
|||
|
||||
void Vector2dPy::init_type(void)
|
||||
{
|
||||
behaviors().name( "Vector2dPy" );
|
||||
behaviors().name( "Vector2d" );
|
||||
behaviors().doc( "Vector2d class" );
|
||||
behaviors().supportGetattro();
|
||||
behaviors().supportSetattro();
|
||||
|
|
|
@ -76,6 +76,8 @@ private:
|
|||
|
||||
namespace Py {
|
||||
|
||||
typedef PythonClassObject<Base::Vector2dPy> Vector2d;
|
||||
|
||||
// Implementing the vector class in the fashion of the PyCXX library.
|
||||
class BaseExport Vector : public Object
|
||||
{
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
|
||||
namespace Py
|
||||
{
|
||||
extern PythonExtensionBase *getPythonExtensionBase( PyObject *self );
|
||||
PYCXX_EXPORT extern PythonExtensionBase *getPythonExtensionBase( PyObject *self );
|
||||
|
||||
struct PythonClassInstance
|
||||
{
|
||||
|
|
|
@ -650,7 +650,7 @@ PythonType &PythonType::supportIter()
|
|||
// Handlers
|
||||
//
|
||||
//--------------------------------------------------------------------------------
|
||||
PythonExtensionBase *getPythonExtensionBase( PyObject *self )
|
||||
PYCXX_EXPORT PythonExtensionBase *getPythonExtensionBase( PyObject *self )
|
||||
{
|
||||
if( self->ob_type->tp_flags&Py_TPFLAGS_BASETYPE )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user