Skip to content

Commit

Permalink
declare some PyCXX functions for export, add PyCXX wrapper for Vector…
Browse files Browse the repository at this point in the history
…2dPy class
  • Loading branch information
wwmayer committed Nov 24, 2016
1 parent cdf4524 commit 95768ac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Base/GeometryPyCXX.cpp
Expand Up @@ -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();
Expand Down
2 changes: 2 additions & 0 deletions src/Base/GeometryPyCXX.h
Expand Up @@ -76,6 +76,8 @@ class BaseExport Vector2dPy : public Py::PythonClass<Vector2dPy>

namespace Py {

typedef PythonClassObject<Base::Vector2dPy> Vector2d;

// Implementing the vector class in the fashion of the PyCXX library.
class BaseExport Vector : public Object
{
Expand Down
2 changes: 1 addition & 1 deletion src/CXX/Python2/ExtensionType.hxx
Expand Up @@ -104,7 +104,7 @@

namespace Py
{
extern PythonExtensionBase *getPythonExtensionBase( PyObject *self );
PYCXX_EXPORT extern PythonExtensionBase *getPythonExtensionBase( PyObject *self );

struct PythonClassInstance
{
Expand Down
2 changes: 1 addition & 1 deletion src/CXX/Python2/cxx_extensions.cxx
Expand Up @@ -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 )
{
Expand Down

0 comments on commit 95768ac

Please sign in to comment.