Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r67032:635bc4fa02ea
Date: 2013-09-21 10:19 +0200
http://bitbucket.org/pypy/pypy/changeset/635bc4fa02ea/

Log:    merge heads

diff --git a/pypy/doc/faq.rst b/pypy/doc/faq.rst
--- a/pypy/doc/faq.rst
+++ b/pypy/doc/faq.rst
@@ -356,7 +356,7 @@
   attempt to point newcomers at existing alternatives, which are more
   mainstream and where they will get help from many people.*
 
-  *If anybody seriously wants to promote RPython anyway, he is welcome
+  *If anybody seriously wants to promote RPython anyway, they are welcome
   to: we won't actively resist such a plan.  There are a lot of things
   that could be done to make RPython a better Java-ish language for
   example, starting with supporting non-GIL-based multithreading, but we
@@ -396,8 +396,8 @@
 patch the generated machine code.
 
 So the position of the core PyPy developers is that if anyone wants to
-make an N+1'th attempt with LLVM, he is welcome, and he will receive a
-bit of help on the IRC channel, but he is left with the burden of proof
+make an N+1'th attempt with LLVM, they are welcome, and will be happy to
+provide help in the IRC channel, but they are left with the burden of proof
 that it works.
 
 ----------------------
diff --git a/pypy/module/micronumpy/interp_numarray.py 
b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -96,7 +96,7 @@
             raise OperationError(space.w_ValueError,
                                  space.wrap("index out of range for array"))
         idx_iter = idx.create_iter()
-        size = loop.count_all_true_iter(idx_iter, self.get_shape(), 
idx.get_dtype())
+        size = loop.count_all_true_iter(idx_iter, idx.get_shape(), 
idx.get_dtype())
         if size > val.get_size() and val.get_size() > 1:
             raise OperationError(space.w_ValueError, space.wrap("NumPy boolean 
array indexing assignment "
                                                                 "cannot assign 
%d input values to "
diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py
--- a/pypy/module/micronumpy/loop.py
+++ b/pypy/module/micronumpy/loop.py
@@ -374,9 +374,12 @@
 
 def setitem_filter(arr, index, value, size):
     arr_iter = arr.create_iter()
-    index_iter = index.create_iter(arr.get_shape())
+    shapelen = len(arr.get_shape())
+    if shapelen > 1 and len(index.get_shape()) < 2:
+        index_iter = index.create_iter(arr.get_shape(), 
backward_broadcast=True)
+    else:
+        index_iter = index.create_iter()
     value_iter = value.create_iter([size])
-    shapelen = len(arr.get_shape())
     index_dtype = index.get_dtype()
     arr_dtype = arr.get_dtype()
     while not index_iter.done():
diff --git a/rpython/rtyper/module/ll_os.py b/rpython/rtyper/module/ll_os.py
--- a/rpython/rtyper/module/ll_os.py
+++ b/rpython/rtyper/module/ll_os.py
@@ -1668,6 +1668,16 @@
         return extdef([int], int, llimpl=nice_llimpl,
                       export_name="ll_os.ll_os_nice")
 
+    @registering_if(os, 'ctermid')
+    def register_os_ctermid(self):
+        os_ctermid = self.llexternal('ctermid', [rffi.CCHARP], rffi.CCHARP)
+
+        def ctermid_llimpl():
+            return rffi.charp2str(os_ctermid(lltype.nullptr(rffi.CCHARP.TO)))
+
+        return extdef([], str, llimpl=ctermid_llimpl,
+                      export_name="ll_os.ll_os_ctermid")
+
 # --------------------------- os.stat & variants ---------------------------
 
     @registering(os.fstat)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to