Armin Rigo  committed 635bc4f Merge

merge heads

  • Participants
  • Parent commits 0da8670, c5b5187

Comments (0)

Files changed (4)

File pypy/doc/faq.rst

   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
 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.

File pypy/module/micronumpy/

             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 "

File pypy/module/micronumpy/

 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():

File rpython/rtyper/module/

         return extdef([int], int, llimpl=nice_llimpl,
+    @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 ---------------------------