Agreed, have been doing basically that for some internal code, as the docs kind of hint:
http://pypy.readthedocs.org/en/latest/embedding.html#more-complete-example Basically call the pypy_execute_source_ptr() once, passing in a API struct to fill out for low-level call-backs. (And passing in at the same time functions for python to call to C). On Sun, Aug 16, 2015 at 12:42 AM, Maciej Fijalkowski <fij...@gmail.com> wrote: > On Sun, Aug 16, 2015 at 6:12 AM, Yicong Huang <hengha....@gmail.com> wrote: >> Thanks for reminding! >> I looked at the code, and observed the gloal new dict might leak memory. >> >> Calling pypy_execute_source_ptr() multiple times might be a common usage: >> you might have several python files to execute, or you might get python code >> segment from input one by one ... >> I am thinking could we have better ways to do such calls, e.g.: > > That use case is much better handled from python (e.g. using exec() or > import or any other way to execute more python code) > _______________________________________________ > pypy-dev mailing list > pypy-dev@python.org > https://mail.python.org/mailman/listinfo/pypy-dev _______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev