mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 05:42:30 +00:00
Renamed IntWrapper to int_wrapper
[SVN r20385]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
// $Id$
|
||||
//
|
||||
|
||||
#include "IntWrapper.hpp"
|
||||
#include "int_wrapper.hpp"
|
||||
#include <boost/python/suite/indexing/container_suite.hpp>
|
||||
|
||||
#include <map>
|
||||
@@ -28,10 +28,11 @@
|
||||
#include <boost/python/def.hpp>
|
||||
#include <boost/python/implicit.hpp>
|
||||
|
||||
bool IntWrapper::gIntWrapperTrace = true;
|
||||
unsigned IntWrapper::ourObjectCounter = 0;
|
||||
// More messiness from not having a separate int_wrapper.cpp file
|
||||
bool int_wrapper::our_trace_flag = true;
|
||||
unsigned int_wrapper::our_object_counter = 0;
|
||||
|
||||
std::string repr (IntWrapper const &i)
|
||||
std::string repr (int_wrapper const &i)
|
||||
{
|
||||
std::stringstream temp;
|
||||
temp << i;
|
||||
@@ -40,17 +41,17 @@ std::string repr (IntWrapper const &i)
|
||||
|
||||
BOOST_PYTHON_MODULE(testnonlinear)
|
||||
{
|
||||
boost::python::implicitly_convertible <int, IntWrapper>();
|
||||
boost::python::implicitly_convertible <int, int_wrapper>();
|
||||
|
||||
boost::python::def ("setTrace", &IntWrapper::setTrace);
|
||||
boost::python::def ("setTrace", &int_wrapper::setTrace);
|
||||
|
||||
boost::python::class_<IntWrapper> ("IntWrapper", boost::python::init<int>())
|
||||
.def ("increment", &IntWrapper::increment)
|
||||
boost::python::class_<int_wrapper> ("int_wrapper", boost::python::init<int>())
|
||||
.def ("increment", &int_wrapper::increment)
|
||||
.def ("__repr__", repr)
|
||||
.def ("__cmp__", compare)
|
||||
;
|
||||
|
||||
typedef std::map<std::string, IntWrapper> Container1;
|
||||
typedef std::map<std::string, int_wrapper> Container1;
|
||||
typedef std::set<std::string> Container2;
|
||||
|
||||
#if !BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
Reference in New Issue
Block a user