[pypy-dev] os.major? os.minor?

Benjamin Peterson benjamin at python.org
Sat Dec 11 02:30:25 CET 2010

2010/12/10 Dan Stromberg <drsalists at gmail.com>:
> On Fri, Dec 10, 2010 at 11:50 AM, Benjamin Peterson <benjamin at python.org> wrote:
>> 2010/12/10 Dan Stromberg <drsalists at gmail.com>:
>>> On Thu, Dec 9, 2010 at 10:33 AM, Armin Rigo <arigo at tunes.org> wrote:
>>>> Hi,
>>>> Sorry for the series of mails.  I just wanted to add that after
>>>> looking more at the code, it's fine if you implement major() and
>>>> minor() the same way as the other posix functions (see e.g. r79941
>>>> adding os.fchdir()), calling the major() and minor() "functions" in C.
>>>>  If you add tests in the same places I did in r79941, then it should
>>>> work even if the functions are actually macros.  One place where it
>>>> would not work is in translated code running on the llinterp; the
>>>> other place might be the JIT trying to get the address of the
>>>> "function".  (If that's the case, we should fix that a bit more
>>>> generally.)
>>>> A bientôt,
>>>> Armin.
>>> I attempted to add os.major and os.minor using fchdir as an example,
>>> but...  I have to admit: I really don't know what to make of this
>>> error.  Comments?
>> You probably failed to add an ll implementation in
>> pypy/rpython/lltypesystem/module/ll_os.py
> Do you mean pypy/rpython/module/ll_os.py ?  I have no
> pypy/rpython/lltypesystem/module/ll_os.py .

Yes, sorry. It's easy to get those rpython/ subdirs mixed up . :)


More information about the Pypy-dev mailing list