2
0
mirror of https://github.com/boostorg/python.git synced 2026-02-08 11:02:30 +00:00

Compare commits

..

10 Commits

Author SHA1 Message Date
nobody
10c2fbd63a This commit was manufactured by cvs2svn to create branch
'iter-adaptor-and-categories'.

[SVN r10453]
2001-06-27 22:12:20 +00:00
Dave Abrahams
4328ae1d8d Updates for Boost.Build
[SVN r10403]
2001-06-22 22:36:00 +00:00
Ralf W. Grosse-Kunstleve
88372000b5 fixes due to Jens Maurer (merged from branch boost_python_friend_fixes)
[SVN r10395]
2001-06-22 00:49:58 +00:00
Dave Abrahams
081150b477 Quick Borland fix
[SVN r10391]
2001-06-21 23:40:04 +00:00
Dave Abrahams
1364b97b88 A small Borland fix
[SVN r10390]
2001-06-21 23:39:30 +00:00
Dave Abrahams
7c33a46a76 A small fix for Borland
[SVN r10389]
2001-06-21 23:38:42 +00:00
Ralf W. Grosse-Kunstleve
8b88e9f727 define changed to enable Silicon Graphics gcc compilation.
[SVN r10378]
2001-06-21 20:49:41 +00:00
Ralf W. Grosse-Kunstleve
91f0728b55 Minor fix, thanks to Jens Maurer.
[SVN r10377]
2001-06-21 20:46:26 +00:00
Dave Abrahams
7a71cea92a updated ILU links thanks to Scott Langley
[SVN r10355]
2001-06-18 12:11:46 +00:00
Dave Abrahams
29a855813d fixed typo
[SVN r10240]
2001-05-28 20:14:25 +00:00
20 changed files with 59 additions and 35 deletions

View File

@@ -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 \

View File

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

View File

@@ -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&ltFoo&gt::ptr_to_python(p);
return boost::python::python_extension_class_converters&lt;Foo&gt::ptr_to_python(p);
}
PyObject* to_python(const Foo* p)

View File

@@ -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.

View File

@@ -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])

View File

@@ -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())

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

@@ -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])

View File

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

View File

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

View File

@@ -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>__

View File

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

View File

@@ -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])