Commit 2deb1958 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Convert all of our file methods to the CPython implementations

There's some low-hanging optimization fruit in here if we want to
(unnecessary crossings between Pyston and CAPI environments)
but we'll see.
parent 6bba2b53
......@@ -79,6 +79,10 @@ Box* BoxedWrapperDescriptor::__get__(BoxedWrapperDescriptor* self, Box* inst, Bo
return new BoxedWrapperObject(self, inst);
}
extern "C" int PyObject_AsCharBuffer(PyObject* obj, const char** buffer, Py_ssize_t* buffer_len) noexcept {
Py_FatalError("unimplemented");
}
// copied from CPython's getargs.c:
extern "C" int PyBuffer_FillInfo(Py_buffer* view, PyObject* obj, void* buf, Py_ssize_t len, int readonly,
int flags) noexcept {
......
This diff is collapsed.
......@@ -3,16 +3,20 @@ import time
print type(allocate_lock())
print_lock = allocate_lock()
done = 0
def run(arg):
global done
with print_lock:
print "in other thread!", arg
done = 1
print "starting!"
t = start_new_thread(run, (5,))
print type(t)
with print_lock:
t = start_new_thread(run, (5,))
print type(t)
while not done:
time.sleep(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment