Uwe Schmitt wrote:
> Stefan Behnel schrieb:
>> Hmm, your code example is not very complete. An educated guess is that
>> the
>> above code occurs inside a function, and the assignment to SVDVerbosity
>> makes it a local variable (normal Python behaviour). Since it hasn't
>> been declared, it has the normal Python object type.
> Ok, that is the reason.  Changing
>
>    SVDVerbosity = 0
>
> to
>
>    cdef extern long SVDVerbosity = 0
>
> helps.
>
> The reason is that I am interfacing external C code where
> the verbosity of its output is controlled by this global
> variable.

Ah, now I get it. A "global" statement would also do the trick, BTW.

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to