sion.c#L140-142
Interleaving declarations and statements is not allowed in C90...
Best Regards,
Nikita Nemkin
0001-Fixed-explicit-coercion-of-ctypedef-ed-C-types.patch
Description: Binary data
___
cython-devel mailing list
cython-devel@python.org
http://mail.pyt
points, like
the choice of base type (Py_UNICODE vs wchar_t) or the nature of
Py_UNICODE* literals or why this feature is necessary at all.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman
dling in the future.
Believe me, nobody calls Py_UNICODE APIs because they want to, they just
have to.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
literals.
If you are still not convinced, so be it, I'll drop C-level literal
support.
Best regards,
Nikita Nemkin
PS. I made a false claim in the previous mail. (Some of) Python's wchar_t
APIs
do exist in Py2. But they won't manage the memory automatically anyway.
__
lated
section, that also warns about the inefficiency in Py3.3, so that users
don't accidentally assume it's efficient for anything that needs to be
portable.
Sure, I'm writing the docs now.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
On Thu, 07 Mar 2013 17:16:10 +0600, Yury V. Zaytsev
wrote:
Hi,
Is there any syntax that I can use to do something like this in Cython:
py_object_ = PyList_New(123); ?
If not, do you think that this can be added in one way or another?
Unfortunately, I can't think of a non-disruptive wa
Sorry, accidental early send. Previous mail continued...
[None] * N makes an extra pass over the list to assign None to each item
(and also incref None n times).
This is useless extra work. The larget the list, the worse it gets.
Best regards,
Nikita Nemkin
some .pxd:
cdef extern from "Python.h":
ctypedef class __builtin__.BaseException [object
PyBaseExceptionObject]:
pass
and cimport it in another .pyx.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cy
* Creating Exception subclasses as cdef classes.
It's a hack, but a very useful one.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
=EncodedString(value))
elif isinstance(value, _bytes):
return ExprNodes.BytesNode(pos, value=BytesLiteral(value))
Otherwise attempts to use compile-time strings in Python context result
in errors like "AttributeError: 'unicode' object has no attribute
'is_unicode'".
requires a patch to distutils,
see http://stackoverflow.com/a/6035864/204882 for details.
(You can probably monkey-patch it for production use.)
Best regards,
Nikita Nemkin
On Tue, 26 Mar 2013 15:52:02 +0600, Martin Fiers
wrote:
Dear Cython developers,
I stumbled upon a strange error
lly pasted into the generated code.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
ase note "(for extern or public structs only)". These are not mangled.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
her users of Cython: library bindings, speedups
for general purpose modules etc. Another (versioned!) binary dependency
will become a liability to them.
If memoryviews rely on autogenerated (module-specific) code,
how is common runtime supposed to help?
The bulk of Cython utility code is also either
Name() on Windows, dladdr() on everything
else).
I'm interested in implementing this feature someday. For now, doing it
manually is good enough.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
kily) irrelevant to the Python import system.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
On Wed, 10 Apr 2013 11:24:33 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 10.04.2013 06:22:
The stubs don't have to be shared libraries, pure python would work
just fine (and reduce the complexity).
Sure. That's actually the most common way to do it. Most C modules in
CPython
On Wed, 10 Apr 2013 12:57:48 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 10.04.2013 08:44:
Well, here is the workaround Cython can use:
https://gist.github.com/nnemkin/5352088
(Warning: I haven't fully tested it yet).
Interesting. Looks like that could help here, yes. Do you know
, while int requries
something numeric.)
Would it be acceptable to change bint display presentation
to 'bool' ?
Note: other primitive types (short, int, float, long long etc)
don't have this problem, because they are all numeric
and coerce to/from Python numerics in an obvious
On Sat, 20 Apr 2013 02:11:21 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 18.04.2013 07:07:
2) Public/readonly cdef attributes can have docstrings attached, using
the [PEP 258 attribute docstring
syntax](http://www.python.org/dev/peps/pep-0258/#attribute-docstrings).
Example:
cdef
On Sat, 20 Apr 2013 14:27:12 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 20.04.2013 09:11:
On Sat, 20 Apr 2013 02:11:21 +0600, Stefan Behnel wrote:
Separating property from the attribute requires mass renaming of
the attribute (as was recently descussed here) and bloating the code x4.
All
On Sat, 20 Apr 2013 17:41:56 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 20.04.2013 12:43:
On Sat, 20 Apr 2013 14:27:12 +0600, Stefan Behnel wrote:
I did document them manually at first. It is ugly (function doc in one
place,
attribute doc in another)
As it should be. The attributes are
guess that means something is wrong with __Pyx_PyObject_GetSlice utility,
although I wasn't able to create a simple repro yet.
Best regards,
Nikita Nemkin
Hi,
Josh Warner, 24.04.2013 08:06:
Over in scikit-image we have traced an odd problem with a particular
Cython
file to the 0.19 update
On Wed, 24 Apr 2013 13:33:46 +0600, Nikita Nemkin wrote:
Update: this is not a Cython bug.
_mcp.pyx declares #cython: wraparound=False, any negative index is expected
to fail.
It worked previously because Cython was using PySequence_GetSlice
which of course is not sensitive to Cython directives
though the fact that cdef attributes
are properties should be considered more of an implementation detail
IMHO).
I've just found a 4 year old ticket requesting the same feature (2):
http://trac.cython.org/cython_trac/ticket/206
Best regards,
Nikita Nemkin
__
t/246
http://trac.cython.org/cython_trac/ticket/358
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
ly, but
here is the test anyway https://github.com/cython/cython/pull/219
http://trac.cython.org/cython_trac/ticket/113 was fixed
here https://github.com/cython/cython/pull/200, tests included.
Best regards,
Nikita Nemkin
___
cython-devel mailing li
s
forever).
http://trac.cython.org/cython_trac/ticket/775
I'm working on this one and I need an opinion: should utility
classes be made internal by default or should they use
@cython.internal explicitly?
Best regards,
Nikita Nemkin
___
cython-devel
On Sun, 05 May 2013 17:03:54 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 04.05.2013 19:52:
Two changes included:
1) cdef classes in utility code can have compiler directives attached
to them. This is not used anywhere ATM, but memoryviews may benefit
from ``@cython.final``.
2) All
class with errors
Makes me wonder if ErrorScope should be introduced to avoid None scope
checks.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
ion. It would be strange to have global deletion for C++
objects and not for ordinary python objects.
There is nothing strange about it.
C++ pointers behave differently from Python objects and users are
well aware of that. Moreover, C++ deletion is a totally different
operation that just happe
7;t bother turning it off and get
suboptimal code.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
.
And cythonize already provides equivalent functionality.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
ython-dev. I think the code you
wrote should have never compiled in the first place.
cast must be required if you want to reinterpret a C pointer
as object or vice versa.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
On Thu, 30 May 2013 08:25:55 +0600, Robert Bradshaw
wrote:
On Sun, May 26, 2013 at 10:04 AM, Nikita Nemkin wrote:
Hi,
I wonder why is __pyx_filename (in exception check blocks)
tracked dynamically? AFAIK it's impossible to split function
body between multiple files (include only wor
interpreted and manipulated as a Python object.
It is pure luck that whatever values were there didn't cause a crash.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
" (my_jobs *jobs)
or the struct:
cdef struct my_jobs_t "my_jobs"
or both.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
repetition.
What was the reason for ranaming? It would be really nice to
reintroduce old names (_i, _d etc).
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel
On Tue, 04 Jun 2013 14:47:47 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 04.06.2013 10:29:
I just wanted to say that this
https://github.com/cython/cython/commit/a3ace265e68ad97c24ce2b52d99d45b60b26eda2#L1L73
renaming seems totally unnecessary as it makes any array code
verbose and ugly. I
On Tue, 04 Jun 2013 18:27:15 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 04.06.2013 12:17:
On Tue, 04 Jun 2013 14:47:47 +0600, Stefan Behnel wrote:
Nikita Nemkin, 04.06.2013 10:29:
I just wanted to say that this
https://github.com/cython/cython/commit
Hi,
I have just discovered that the following operations do not perform
any type checking ("?" is ignored):
obj, obj, obj, obj, obj.
Can someone please confirm this as a bug?
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cy
tes unnecessary confusion.
Implementation is trivial, all that is necessary is to pass "notnone=False"
flag from parser to TypecastNode to PyTypeTestNode.
What do you think?
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-dev
On Fri, 07 Jun 2013 19:10:34 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 07.06.2013 13:24:
Currently, conditional casts like obj do not allow None values.
This might seem like an inconsistency, because obj does allow None
values, just like a normal assignment. However, it's a special
the binary.
Together with module bundling and embed/freeze it could make a neat
deployment solution.
(I have no plans to implement this.)
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listi
On Tue, 11 Jun 2013 20:03:45 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 11.06.2013 13:51:
Pure Python functions rarely benefit from compilation. I thought it
would be interesting to add an "interpreted" directive (global,
module, class, function level + automatic heuristic) that wil
les for the Python release you are using
("program database" links on this page
http://www.python.org/getit/releases/2.7.5/)
and you will have a comfortable debugging environment.
Best regards,
Nikita Nemkin
___
cython-devel mailing list
cyth
es are incidental to the problem you describe.
(Strictly necessary parts are only the lines involving "prev_type").
* There is a disabled bug test named "inherited_final_method", you
may want to remove/merge it with the test you modified.
I hope this helps.
Best regards,
Nik
On Thu, 29 Aug 2013 12:57:19 +0600, Stefan Behnel
wrote:
Nikita Nemkin, 29.08.2013 08:24:
I have solved it for myself by storing BOTH types in the method entry
(Entry.type for the actual CFuncDef type and Entry.prev_type for the
vtable
slot type). By using correct types in
48 matches
Mail list logo