Re: [pypy-dev] output readable c

2012-04-20 Thread Maciej Fijalkowski
On Fri, Apr 20, 2012 at 6:13 AM, gmail rors...@gmail.com wrote: ** I find pypy translator output c files consist too many 'goto' statement. Its hard to read and understand these c files. I try to make it output with c keywords: if..else.. while...break...continue and now the

Re: [pypy-dev] [cpyext] partial fake PEP393 implementation to provide access to single unicode characters in strings

2012-04-20 Thread Amaury Forgeot d'Arc
2012/4/20 Armin Rigo ar...@tunes.org On Sat, Apr 14, 2012 at 18:44, Stefan Behnel stefan...@behnel.de wrote: PEP393 (the new Unicode type in Py3.3) defines a rather useful C interface towards the characters of a Unicode string. I think it would be cool if cpyext provided that, so that

Re: [pypy-dev] [cpyext] partial fake PEP393 implementation to provide access to single unicode characters in strings

2012-04-20 Thread Armin Rigo
Hi Amaury, On Fri, Apr 20, 2012 at 11:02, Amaury Forgeot d'Arc amaur...@gmail.com wrote: But is it desirable? The first call to PyUnicode_AsUnicode will allocate and copy the unicode buffer, but subsequent calls will quickly return the same address. Indeed, it's a bit unclear. If I may

Re: [pypy-dev] [cpyext] partial fake PEP393 implementation to provide access to single unicode characters in strings

2012-04-20 Thread Stefan Behnel
Armin Rigo, 20.04.2012 11:16: On Fri, Apr 20, 2012 at 11:02, Amaury Forgeot d'Arc wrote: But is it desirable? The first call to PyUnicode_AsUnicode will allocate and copy the unicode buffer, but subsequent calls will quickly return the same address. Indeed, it's a bit unclear. If I may

Re: [pypy-dev] output readable c

2012-04-20 Thread Alexander Pyattaev
What is the purpose? For the target c/c++ compiler it is all the same, is not it? Or is the purpose to make a python-c++ converter? Cheers, Alex perjantai 20 huhtikuu 2012 09:09:12 Maciej Fijalkowski kirjoitti: On Fri, Apr 20, 2012 at 6:13 AM, gmail rors...@gmail.com wrote: I find pypy

Re: [pypy-dev] output readable c

2012-04-20 Thread Amaury Forgeot d'Arc
2012/4/20 gmail rors...@gmail.com I am still work hard try to improve pypy to get readable c++ output. Anyone interest in this ? The result is much better, especially with long functions. Yes, this is interesting! Continue! Your code needs to be polished though: comments, better names, pep8

Re: [pypy-dev] output readable c

2012-04-20 Thread bookaa
yes, pypy's output c files is enough for c compilers. But its terrible if you want to read the c source codes. I really very interest in make a python to c++ converter, based on pypy translator. thanks Bookaa From: Alexander Pyattaev Sent: Saturday, April 21, 2012 6:54 AM To:

[pypy-dev] A test bug in Windows system

2012-04-20 Thread bookaa
My os is Win7, Trying pypy-pypy-2346207d9946 run: pypytest_all.py translator\test\test_unsimplify.py will get a error: WindowsError: [Error 5] : it can not os.unlink(..) a file. I find this is because fd = os.open(tmpfile, os.O_WRONLY | os.O_CREAT, 0) will create a readonly