On 16/02/14 17:22, Gael Varoquaux wrote:

 > Speaking of which, do you have any feedback on the fact that
 > sklearn/utils/fast_dict.cpp (Cython-generated) in the PR
 > https://github.com/scikit-learn/scikit-learn/pull/2199
 > does not compile on clang. I am clueless in CPP, so I would appreciate
 > comments a lot.

Eh, I am not even sure it should be legal to call an iterator like this:

    typedef __pyx_t_7sklearn_5utils_9fast_dict_ITYPE_t ITYPE;
    typedef __pyx_t_7sklearn_5utils_9fast_dict_DTYPE_t DTYPE;

    p->__pyx_v_it.std::map<ITYPE,DTYPE>::iterator::~iterator();

(I typedef'ed the Cython generated template types for clarity here.)

Destructors in C++ should be called by calling delete, like so:

    delete p->__pyx_v_it;

It seems Cython is not generating normal C++. I don't know why.


Sturla


------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to