Ticket #2016: change_default_object_to_dict.patch

File change_default_object_to_dict.patch, 1.2 KB (added by schlotz <scholz@…>, 14 years ago)

Change exec default arguments from object() to dict()

  • exec.hpp

     
    55#ifndef EXEC_SS20050616_HPP
    66# define EXEC_SS20050616_HPP
    77
    8 # include <boost/python/object.hpp>
     8# include <boost/python/dict.hpp>
    99# include <boost/python/str.hpp>
    1010
    1111namespace boost
     
    1818// used during evaluation.
    1919object
    2020BOOST_PYTHON_DECL
    21 eval(str string, object global = object(), object local = object());
     21eval(str string, object global = dict(), object local = dict());
    2222
    2323// Execute python source code from str.
    2424// global and local are the global and local scopes respectively,
    2525// used during execution.
    2626object
    2727BOOST_PYTHON_DECL
    28 exec(str string, object global = object(), object local = object());
     28exec(str string, object global = dict(), object local = dict());
    2929
    3030// Execute python source code from file filename.
    3131// global and local are the global and local scopes respectively,
    3232// used during execution.
    3333object
    3434BOOST_PYTHON_DECL
    35 exec_file(str filename, object global = object(), object local = object());
     35exec_file(str filename, object global = dict(), object local = dict());
    3636
    3737}
    3838}