2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-20 04:42:28 +00:00

Compare commits

..

7 Commits

Author SHA1 Message Date
Stefan Seefeld
e1e9eb303a Merge pull request #13 from ax3l/fix-missingPlaceholderInclude
Fix Trac #10932 Missing Include: Bind Placeholders
2015-03-26 09:16:15 -04:00
Stefan Seefeld
9eee9ef461 Merge pull request #15 from mmatrosov/master
Fix #11100 and #8058: binary compatibility and leaked file handle in exec_file()
2015-03-26 08:23:15 -04:00
Mikhail Matrosov
fe24ab9dd5 [#8058] Close file handle before exec_file() routine returns. 2015-03-11 01:11:54 +03:00
Mikhail Matrosov
a911c17fd6 [#11100] Fix binary incompatibilities with fopen() in exec_file() routine. 2015-03-11 01:11:54 +03:00
Daniel James
8d5d777ebb Add metadata file. 2015-01-25 21:25:23 +02:00
Axel Huebl
17a7655c74 Fix Missing Include: Bind Placeholders
boost/python/exception_translator.hpp(22): error: identifier "_1" is undefined
boost/python/exception_translator.hpp(22): error: identifier "_2" is undefined
2015-01-14 16:02:23 +01:00
Beman Dawes
832a1edd79 Merge 86392 from trunk. The spirit change was not applied because the file is not present in branches/release.
[SVN r86489]
2013-10-27 21:10:04 +00:00
100 changed files with 36 additions and 10 deletions

BIN
build/Attic/python_v1.zip Normal file

Binary file not shown.

0
doc/PyConDC_2003/bpl.html Normal file → Executable file
View File

0
doc/PyConDC_2003/bpl.pdf Normal file → Executable file
View File

0
doc/PyConDC_2003/python_cpp_mix.jpg Normal file → Executable file
View 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
View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

0
doc/internals.html Normal file → Executable file
View File

0
doc/internals.rst Normal file → Executable file
View File

0
doc/tutorial/doc/html/images/alert.png Normal file → Executable file
View 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
View 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
View 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
View 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
View 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
View 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
View File

Before

Width:  |  Height:  |  Size: 370 B

After

Width:  |  Height:  |  Size: 370 B

0
doc/v2/instance_holder.html Normal file → Executable file
View File

0
doc/v2/lvalue_from_pytype.html Normal file → Executable file
View File

0
doc/v2/operators.html Normal file → Executable file
View File

0
doc/v2/raw_function.html Normal file → Executable file
View File

0
doc/v2/return_arg.html Normal file → Executable file
View File

0
doc/v2/stl_iterator.html Normal file → Executable file
View File

0
doc/v2/type_id.html Normal file → Executable file
View File

0
doc/v2/wrapper.html Normal file → Executable file
View File

View 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
View File

View 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

View File

@@ -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
View File

0
include/boost/python/base_type_traits.hpp Normal file → Executable file
View File

0
include/boost/python/borrowed.hpp Normal file → Executable file
View File

0
include/boost/python/cast.hpp Normal file → Executable file
View File

0
include/boost/python/converter/arg_from_python.hpp Normal file → Executable file
View File

0
include/boost/python/converter/arg_to_python.hpp Normal file → Executable file
View File

0
include/boost/python/converter/arg_to_python_base.hpp Normal file → Executable file
View File

View File

0
include/boost/python/converter/object_manager.hpp Normal file → Executable file
View File

0
include/boost/python/converter/pytype_function.hpp Normal file → Executable file
View File

0
include/boost/python/converter/return_from_python.hpp Normal file → Executable file
View File

0
include/boost/python/def_visitor.hpp Normal file → Executable file
View File

0
include/boost/python/detail/borrowed_ptr.hpp Normal file → Executable file
View File

0
include/boost/python/detail/convertible.hpp Normal file → Executable file
View File

0
include/boost/python/detail/copy_ctor_mutates_rhs.hpp Normal file → Executable file
View File

0
include/boost/python/detail/def_helper_fwd.hpp Normal file → Executable file
View File

0
include/boost/python/detail/enable_if.hpp Normal file → Executable file
View File

0
include/boost/python/detail/force_instantiate.hpp Normal file → Executable file
View File

0
include/boost/python/detail/is_shared_ptr.hpp Normal file → Executable file
View File

0
include/boost/python/detail/is_wrapper.hpp Normal file → Executable file
View File

View File

0
include/boost/python/detail/prefix.hpp Normal file → Executable file
View File

0
include/boost/python/detail/python_type.hpp Normal file → Executable file
View File

0
include/boost/python/detail/sfinae.hpp Normal file → Executable file
View File

0
include/boost/python/detail/unwind_type.hpp Normal file → Executable file
View File

0
include/boost/python/detail/unwrap_type_id.hpp Normal file → Executable file
View File

0
include/boost/python/detail/unwrap_wrapper.hpp Normal file → Executable file
View File

0
include/boost/python/detail/value_arg.hpp Normal file → Executable file
View File

0
include/boost/python/detail/wrapper_base.hpp Normal file → Executable file
View File

0
include/boost/python/docstring_options.hpp Normal file → Executable file
View File

View 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
View File

0
include/boost/python/handle_fwd.hpp Normal file → Executable file
View File

0
include/boost/python/object.hpp Normal file → Executable file
View File

0
include/boost/python/object/function_doc_signature.hpp Normal file → Executable file
View File

0
include/boost/python/object/inheritance_query.hpp Normal file → Executable file
View File

0
include/boost/python/object/stl_iterator_core.hpp Normal file → Executable file
View File

0
include/boost/python/object_items.hpp Normal file → Executable file
View File

0
include/boost/python/object_protocol_core.hpp Normal file → Executable file
View File

0
include/boost/python/other.hpp Normal file → Executable file
View File

0
include/boost/python/proxy.hpp Normal file → Executable file
View File

0
include/boost/python/pure_virtual.hpp Normal file → Executable file
View File

0
include/boost/python/raw_function.hpp Normal file → Executable file
View File

0
include/boost/python/refcount.hpp Normal file → Executable file
View File

0
include/boost/python/return_arg.hpp Normal file → Executable file
View File

0
include/boost/python/self.hpp Normal file → Executable file
View File

0
include/boost/python/stl_iterator.hpp Normal file → Executable file
View File

0
include/boost/python/wrapper.hpp Normal file → Executable file
View File

15
meta/libraries.json Normal file
View 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>"
]
}

View File

@@ -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));
}

0
src/wrapper.cpp Normal file → Executable file
View File

0
test/borrowed.cpp Normal file → Executable file
View File

0
test/cltree.cpp Normal file → Executable file
View File

0
test/copy_ctor_mutates_rhs.cpp Normal file → Executable file
View File

0
test/crossmod_exception_a.cpp Normal file → Executable file
View File

0
test/crossmod_exception_b.cpp Normal file → Executable file
View File

0
test/injected.cpp Normal file → Executable file
View File

0
test/int_map_indexing_suite.cpp Normal file → Executable file
View File

0
test/keywords.cpp Normal file → Executable file
View File

0
test/object_fail1.cpp Normal file → Executable file
View File

0
test/object_manager.cpp Normal file → Executable file
View File

0
test/operators.cpp Normal file → Executable file
View File

0
test/polymorphism2.cpp Normal file → Executable file
View File

0
test/polymorphism2_auto_ptr.cpp Normal file → Executable file
View File

0
test/properties.cpp Normal file → Executable file
View File

0
test/raw_ctor.cpp Normal file → Executable file
View File

0
test/raw_pyobject_fail1.cpp Normal file → Executable file
View File

0
test/raw_pyobject_fail2.cpp Normal file → Executable file
View File

0
test/result.cpp Normal file → Executable file
View File

0
test/return_arg.cpp Normal file → Executable file
View File

0
test/stl_iterator.cpp Normal file → Executable file
View File

0
test/voidptr.cpp Normal file → Executable file
View File

0
test/wrapper_held_type.cpp Normal file → Executable file
View File

0
todo.html Normal file → Executable file
View File