Compare commits
7 Commits
boost-1.54
...
boost-1.58
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1e9eb303a | ||
|
|
9eee9ef461 | ||
|
|
fe24ab9dd5 | ||
|
|
a911c17fd6 | ||
|
|
8d5d777ebb | ||
|
|
17a7655c74 | ||
|
|
832a1edd79 |
BIN
build/Attic/python_v1.zip
Normal file
0
doc/PyConDC_2003/bpl.html
Normal file → Executable file
0
doc/PyConDC_2003/bpl.pdf
Normal file → Executable file
0
doc/PyConDC_2003/python_cpp_mix.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
0
doc/PyConDC_2003/python_cpp_mix.png
Normal file → Executable file
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
0
doc/internals.html
Normal file → Executable file
0
doc/internals.rst
Normal file → Executable file
0
doc/tutorial/doc/html/images/alert.png
Normal file → Executable file
|
Before Width: | Height: | Size: 603 B After Width: | Height: | Size: 603 B |
0
doc/tutorial/doc/html/images/home.png
Normal file → Executable file
|
Before Width: | Height: | Size: 358 B After Width: | Height: | Size: 358 B |
0
doc/tutorial/doc/html/images/next.png
Normal file → Executable file
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
0
doc/tutorial/doc/html/images/note.png
Normal file → Executable file
|
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
0
doc/tutorial/doc/html/images/prev.png
Normal file → Executable file
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
0
doc/tutorial/doc/html/images/tip.png
Normal file → Executable file
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 640 B |
0
doc/tutorial/doc/html/images/up.png
Normal file → Executable file
|
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 370 B |
0
doc/v2/instance_holder.html
Normal file → Executable file
0
doc/v2/lvalue_from_pytype.html
Normal file → Executable file
0
doc/v2/operators.html
Normal file → Executable file
0
doc/v2/raw_function.html
Normal file → Executable file
0
doc/v2/return_arg.html
Normal file → Executable file
0
doc/v2/stl_iterator.html
Normal file → Executable file
0
doc/v2/type_id.html
Normal file → Executable file
0
doc/v2/wrapper.html
Normal file → Executable file
@@ -11,7 +11,10 @@ use-project boost
|
||||
# boost_python library from the project whose global ID is
|
||||
# /boost/python.
|
||||
project
|
||||
: requirements <library>/boost/python//boost_python ;
|
||||
: requirements <library>/boost/python//boost_python
|
||||
<implicit-dependency>/boost//headers
|
||||
: usage-requirements <implicit-dependency>/boost//headers
|
||||
;
|
||||
|
||||
# Declare the three extension modules. You can specify multiple
|
||||
# source files after the colon separated by spaces.
|
||||
|
||||
0
example/boost-build.jam
Normal file → Executable file
@@ -12,6 +12,8 @@ use-project boost
|
||||
# /boost/python.
|
||||
project boost-python-quickstart
|
||||
: requirements <library>/boost/python//boost_python
|
||||
<implicit-dependency>/boost//headers
|
||||
: usage-requirements <implicit-dependency>/boost//headers
|
||||
;
|
||||
|
||||
# Make the definition of the python-extension rule available
|
||||
|
||||
@@ -20,7 +20,10 @@ use-project boost
|
||||
# boost_python library from the project whose global ID is
|
||||
# /boost/python.
|
||||
project
|
||||
: requirements <library>/boost/python//boost_python ;
|
||||
: requirements <library>/boost/python//boost_python
|
||||
<implicit-dependency>/boost//headers
|
||||
: usage-requirements <implicit-dependency>/boost//headers
|
||||
;
|
||||
|
||||
# Declare the three extension modules. You can specify multiple
|
||||
# source files after the colon separated by spaces.
|
||||
|
||||
0
include/boost/python/arg_from_python.hpp
Normal file → Executable file
0
include/boost/python/base_type_traits.hpp
Normal file → Executable file
0
include/boost/python/borrowed.hpp
Normal file → Executable file
0
include/boost/python/cast.hpp
Normal file → Executable file
0
include/boost/python/converter/arg_from_python.hpp
Normal file → Executable file
0
include/boost/python/converter/arg_to_python.hpp
Normal file → Executable file
0
include/boost/python/converter/arg_to_python_base.hpp
Normal file → Executable file
0
include/boost/python/converter/context_result_converter.hpp
Normal file → Executable file
0
include/boost/python/converter/object_manager.hpp
Normal file → Executable file
0
include/boost/python/converter/pytype_function.hpp
Normal file → Executable file
0
include/boost/python/converter/return_from_python.hpp
Normal file → Executable file
0
include/boost/python/def_visitor.hpp
Normal file → Executable file
0
include/boost/python/detail/borrowed_ptr.hpp
Normal file → Executable file
0
include/boost/python/detail/convertible.hpp
Normal file → Executable file
0
include/boost/python/detail/copy_ctor_mutates_rhs.hpp
Normal file → Executable file
0
include/boost/python/detail/def_helper_fwd.hpp
Normal file → Executable file
0
include/boost/python/detail/enable_if.hpp
Normal file → Executable file
0
include/boost/python/detail/force_instantiate.hpp
Normal file → Executable file
0
include/boost/python/detail/is_shared_ptr.hpp
Normal file → Executable file
0
include/boost/python/detail/is_wrapper.hpp
Normal file → Executable file
0
include/boost/python/detail/nullary_function_adaptor.hpp
Normal file → Executable file
0
include/boost/python/detail/prefix.hpp
Normal file → Executable file
0
include/boost/python/detail/python_type.hpp
Normal file → Executable file
0
include/boost/python/detail/sfinae.hpp
Normal file → Executable file
0
include/boost/python/detail/unwind_type.hpp
Normal file → Executable file
0
include/boost/python/detail/unwrap_type_id.hpp
Normal file → Executable file
0
include/boost/python/detail/unwrap_wrapper.hpp
Normal file → Executable file
0
include/boost/python/detail/value_arg.hpp
Normal file → Executable file
0
include/boost/python/detail/wrapper_base.hpp
Normal file → Executable file
0
include/boost/python/docstring_options.hpp
Normal file → Executable file
@@ -8,6 +8,7 @@
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
|
||||
# include <boost/bind.hpp>
|
||||
# include <boost/bind/placeholders.hpp>
|
||||
# include <boost/type.hpp>
|
||||
# include <boost/python/detail/translate_exception.hpp>
|
||||
# include <boost/python/detail/exception_handler.hpp>
|
||||
|
||||
0
include/boost/python/handle.hpp
Normal file → Executable file
0
include/boost/python/handle_fwd.hpp
Normal file → Executable file
0
include/boost/python/object.hpp
Normal file → Executable file
0
include/boost/python/object/function_doc_signature.hpp
Normal file → Executable file
0
include/boost/python/object/inheritance_query.hpp
Normal file → Executable file
0
include/boost/python/object/stl_iterator_core.hpp
Normal file → Executable file
0
include/boost/python/object_items.hpp
Normal file → Executable file
0
include/boost/python/object_protocol_core.hpp
Normal file → Executable file
0
include/boost/python/other.hpp
Normal file → Executable file
0
include/boost/python/proxy.hpp
Normal file → Executable file
0
include/boost/python/pure_virtual.hpp
Normal file → Executable file
0
include/boost/python/raw_function.hpp
Normal file → Executable file
0
include/boost/python/refcount.hpp
Normal file → Executable file
0
include/boost/python/return_arg.hpp
Normal file → Executable file
0
include/boost/python/self.hpp
Normal file → Executable file
0
include/boost/python/stl_iterator.hpp
Normal file → Executable file
0
include/boost/python/wrapper.hpp
Normal file → Executable file
15
meta/libraries.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"key": "python",
|
||||
"name": "Python",
|
||||
"authors": [
|
||||
"Dave Abrahams"
|
||||
],
|
||||
"description": "The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes functions and objects to Python, and vice-versa, using no special tools -- just your C++ compiler.",
|
||||
"category": [
|
||||
"Inter-language"
|
||||
],
|
||||
"maintainers": [
|
||||
"Ralf Grosse-Kunstleve <rwgrosse-kunstleve -at- lbl.gov>",
|
||||
"Ravi Rajagopal <lists_ravi -at- lavabit.com>"
|
||||
]
|
||||
}
|
||||
18
src/exec.cpp
@@ -84,22 +84,24 @@ object BOOST_PYTHON_DECL exec_file(str filename, object global, object local)
|
||||
if (local.is_none()) local = global;
|
||||
// should be 'char const *' but older python versions don't use 'const' yet.
|
||||
char *f = python::extract<char *>(filename);
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
// TODO(bhy) temporary workaround for Python 3.
|
||||
// should figure out a way to avoid binary incompatibilities as the Python 2
|
||||
// version did.
|
||||
FILE *fs = fopen(f, "r");
|
||||
#else
|
||||
|
||||
// Let python open the file to avoid potential binary incompatibilities.
|
||||
#if PY_VERSION_HEX >= 0x03000000
|
||||
// See http://www.codeproject.com/Articles/820116/Embedding-Python-program-in-a-C-Cplusplus-code
|
||||
FILE *fs = _Py_fopen(f, "r");
|
||||
#else
|
||||
PyObject *pyfile = PyFile_FromString(f, const_cast<char*>("r"));
|
||||
if (!pyfile) throw std::invalid_argument(std::string(f) + " : no such file");
|
||||
python::handle<> file(pyfile);
|
||||
FILE *fs = PyFile_AsFile(file.get());
|
||||
#endif
|
||||
PyObject* result = PyRun_File(fs,
|
||||
|
||||
int closeit = 1; // Close file before PyRun returns
|
||||
PyObject* result = PyRun_FileEx(fs,
|
||||
f,
|
||||
Py_file_input,
|
||||
global.ptr(), local.ptr());
|
||||
global.ptr(), local.ptr(),
|
||||
closeit);
|
||||
if (!result) throw_error_already_set();
|
||||
return object(detail::new_reference(result));
|
||||
}
|
||||
|
||||