mirror of
https://github.com/boostorg/python.git
synced 2026-02-08 11:02:30 +00:00
Compare commits
10 Commits
boost-1.22
...
svn-branch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10c2fbd63a | ||
|
|
4328ae1d8d | ||
|
|
88372000b5 | ||
|
|
081150b477 | ||
|
|
1364b97b88 | ||
|
|
7c33a46a76 | ||
|
|
8b88e9f727 | ||
|
|
91f0728b55 | ||
|
|
7a71cea92a | ||
|
|
29a855813d |
@@ -17,14 +17,14 @@
|
||||
ROOT=$(HOME)
|
||||
BOOST=$(ROOT)/boost
|
||||
|
||||
PYEXE=/usr/bin/python
|
||||
PYEXE=PYTHONPATH=. /usr/bin/python
|
||||
PYINC=-I/usr/include/python1.5
|
||||
#PYEXE=/usr/local/Python-1.5.2/bin/python
|
||||
#PYINC=-I/usr/local/Python-1.5.2/include/python1.5
|
||||
#PYEXE=/usr/local/Python-2.0/bin/python
|
||||
#PYINC=-I/usr/local/Python-2.0/include/python2.0
|
||||
|
||||
STDOPTS=-ftemplate-depth-21
|
||||
STDOPTS=-fPIC -ftemplate-depth-21
|
||||
WARNOPTS=
|
||||
OPTOPTS=-g
|
||||
|
||||
@@ -33,7 +33,7 @@ CPPOPTS=$(STLPORTINC) $(STLPORTOPTS) -I$(BOOST) $(PYINC) \
|
||||
$(STDOPTS) $(WARNOPTS) $(OPTOPTS)
|
||||
MAKEDEP=-M
|
||||
|
||||
LD=g++
|
||||
LD=$(CPP)
|
||||
LDOPTS=-shared
|
||||
|
||||
OBJ=classes.o conversions.o extension_class.o functions.o \
|
||||
|
||||
@@ -112,10 +112,10 @@ that.''<br><i>-<a href="mailto:dubois1@llnl.gov">Paul Dubois</a></i>
|
||||
<h2>ILU</h2>
|
||||
<p>
|
||||
<a
|
||||
href="http://www.cl.cam.ac.uk/Research/Rainbow/projects/origami/ilu-1.8-manual">ILU</a>
|
||||
href="ftp://ftp.parc.xerox.com/pub/ilu/ilu.html">ILU</a>
|
||||
is a very ambitious project which tries to describe a module's interface
|
||||
(types and functions) in terms of an <a
|
||||
href="http://www.cl.cam.ac.uk/Research/Rainbow/projects/origami/ilu-1.8-manual/manual_2.html">Interface
|
||||
href="ftp://ftp.parc.xerox.com/pub/ilu/2.0b1/manual-html/manual_2.html">Interface
|
||||
Specification Language</a> (ISL) so that it can be uniformly interfaced
|
||||
to a wide range of computer languages, including Common Lisp, C++, C,
|
||||
Modula-3, and Python. ILU can parse the ISL to generate a C++ language
|
||||
|
||||
@@ -85,7 +85,7 @@ code before the last Python reference to it disappears:
|
||||
BOOST_PYTHON_BEGIN_CONVERSION_NAMESPACE // this is a gcc 2.95.2 bug workaround
|
||||
PyObject* to_python(Foo* p)
|
||||
{
|
||||
return boost::python::python_extension_class_converters<Foo>::ptr_to_python(p);
|
||||
return boost::python::python_extension_class_converters<Foo>::ptr_to_python(p);
|
||||
}
|
||||
|
||||
PyObject* to_python(const Foo* p)
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace { // Avoid cluttering the global namespace.
|
||||
void delitem(std::vector<double>& vd, std::size_t key) {
|
||||
if (key >= vd.size()) raise_vector_IndexError();
|
||||
std::vector<double>::iterator vditer = vd.begin();
|
||||
vd.erase(&vditer[key]);
|
||||
vd.erase(vditer + key);
|
||||
}
|
||||
|
||||
// Convert vector_double to a regular Python tuple.
|
||||
|
||||
@@ -17,7 +17,8 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_abstract
|
||||
doctest.testmod(test_abstract)
|
||||
return doctest.testmod(test_abstract)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
@@ -133,7 +133,8 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_cross_module
|
||||
doctest.testmod(test_cross_module)
|
||||
return doctest.testmod(test_cross_module)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run())
|
||||
|
||||
@@ -16,7 +16,8 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_do_it_yourself_converters
|
||||
doctest.testmod(test_do_it_yourself_converters)
|
||||
return doctest.testmod(test_do_it_yourself_converters)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
@@ -44,7 +44,8 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_example1
|
||||
doctest.testmod(test_example1)
|
||||
return doctest.testmod(test_example1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
@@ -11,7 +11,8 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_getting_started1
|
||||
doctest.testmod(test_getting_started1)
|
||||
return doctest.testmod(test_getting_started1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
@@ -23,7 +23,9 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_getting_started2
|
||||
doctest.testmod(test_getting_started2)
|
||||
return doctest.testmod(test_getting_started2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
|
||||
@@ -25,7 +25,9 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_pickle1
|
||||
doctest.testmod(test_pickle1)
|
||||
return doctest.testmod(test_pickle1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
|
||||
@@ -39,7 +39,9 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_pickle2
|
||||
doctest.testmod(test_pickle2)
|
||||
return doctest.testmod(test_pickle2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_pickle3
|
||||
doctest.testmod(test_pickle3)
|
||||
return doctest.testmod(test_pickle3)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
@@ -11,7 +11,9 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_rwgk1
|
||||
doctest.testmod(test_rwgk1)
|
||||
return doctest.testmod(test_rwgk1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
|
||||
@@ -34,7 +34,9 @@ def run(args = None):
|
||||
import sys
|
||||
sys.argv = args
|
||||
import doctest, test_simple_vector
|
||||
doctest.testmod(test_simple_vector)
|
||||
return doctest.testmod(test_simple_vector)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
import sys
|
||||
sys.exit(run()[0])
|
||||
|
||||
|
||||
@@ -73,7 +73,8 @@ namespace detail {
|
||||
struct parameter_traits
|
||||
{
|
||||
private:
|
||||
typedef const_ref_selector<boost::is_reference<T>::value> selector;
|
||||
enum { is_ref = boost::is_reference<T>::value };
|
||||
typedef const_ref_selector<is_ref> selector;
|
||||
public:
|
||||
typedef typename selector::template const_ref<T>::type const_reference;
|
||||
};
|
||||
|
||||
@@ -375,8 +375,12 @@ PyObject* reprable<Base>::instance_repr(PyObject* obj) const
|
||||
|
||||
// This macro gets the length of an array as a compile-time constant, and will
|
||||
// fail to compile if the parameter is a pointer.
|
||||
#ifdef __BORLANDC__ // smart implementation doesn't work for borland; maybe someone knows a workaround?
|
||||
# define PY_ARRAY_LENGTH(a) (sizeof(a) / sizeof((a)[0]))
|
||||
#else
|
||||
# define PY_ARRAY_LENGTH(a) \
|
||||
(sizeof(::boost::python::detail::countof_validate(a, &(a))) ? sizeof(a) / sizeof((a)[0]) : 0)
|
||||
#endif
|
||||
|
||||
template<typename T>
|
||||
inline void countof_validate(T* const, T* const*);
|
||||
|
||||
@@ -203,7 +203,8 @@ namespace detail {
|
||||
}
|
||||
if (!BOOST_CSTD_::strcmp(name, "__reduce__"))
|
||||
{
|
||||
ref target(as_object(this), ref::increment_count);
|
||||
PyObject* self = as_object(this);
|
||||
ref target(self, ref::increment_count);
|
||||
return bound_function::create(target, global_class_reduce());
|
||||
}
|
||||
|
||||
@@ -808,7 +809,7 @@ namespace detail {
|
||||
// Enable the special handler for methods of the given name, if any.
|
||||
void enable_named_method(boost::python::detail::class_base* type_obj, const char* name)
|
||||
{
|
||||
const std::size_t num_enablers = sizeof(enablers) / sizeof(enablers[0]);
|
||||
const std::size_t num_enablers = PY_ARRAY_LENGTH(enablers);
|
||||
|
||||
// Make sure this ends with "__" since we'll only compare the head of the
|
||||
// string. This is done to make the __getattr__<name>__/__setattr__<name>__
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
#include <math.h> // for pow()
|
||||
#include <boost/rational.hpp>
|
||||
|
||||
#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730
|
||||
#if defined(__sgi) \
|
||||
&& ( (defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730) \
|
||||
&& !defined(__GNUC__))
|
||||
inline double pow(int x, int y) { return pow(static_cast<double>(x), y); }
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1188,7 +1188,7 @@ def run(args = None):
|
||||
if args is not None:
|
||||
sys.argv = args
|
||||
import doctest, comprehensive
|
||||
doctest.testmod(comprehensive)
|
||||
return doctest.testmod(comprehensive)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
sys.exit(run()[0])
|
||||
|
||||
Reference in New Issue
Block a user