Stefan Richthofer

Results 228 comments of Stefan Richthofer

When ``__Pyx_GetModuleGlobalName`` calls ``PySequence_Contains`` it seems not to find the key - in my case ``int64`` - in ``_randint_type``. However by some surrounding checks I am convinced now that the...

Are you familiar with the buffer protocol in CPython and how Jython implements it? You should study the classes in ``org.python.core.buffer`` and classes in ``org.python.core`` that implement ``PyBuffer``. Most important...

This thread from Jython mailing list is also an important read on this topic: http://python.6.x6.nabble.com/Buffer-protocol-direct-vs-JVM-ByteBuffers-td5190804.html

> Taking an interface freezes the object (in some sense), until a release, but that may not pin it in memory, which would have to be JyNI's responsibility for the...

Yes, *direct* is used intentionally. It refers to memory hosted outside the JVM. I suspect JVM might not allow to obtain an array view on *direct* ByteBuffers. However, direct ByteBuffers...

@ysz I think a good initial step would be to implement some test cases. Add some functions concerning buffer protocol operations to the [DemoExtension](https://github.com/Stewori/JyNI/blob/master/DemoExtension/DemoExtensionmodule.c). Add a ``test_JyNI_buffer_protocol.py`` to https://github.com/Stewori/JyNI/tree/master/JyNI-Demo/src, exercising...

Thanks for reporting this issue. However, a copy/paste-able form would have been convenient for reproduction, so I'll share it here: ``` import sys sys.path.append('/usr/lib/python2.7/lib-dynload') import mmap print mmap f =...

I just tried it with some text file and there it works fine. Seems to be unrelated to newline characters. On the other hand I tried it on a distinct...

Okay, these seem to be two separate things. The idea to fix it in ``JySync_Init_JyString_From_PyString`` is promising. However, I don't see why changing to another encoding would solve it. As...

Oh, okay ``\x00`` is really the plain ``0``, I overlooked that. This causes C string handling to terminate it. This makes sense now. Then I'd suggest to use the encoding...