Boost logo

Boost Users :

From: Benjamin Schmeling (Benjamin_Schmeling_at_[hidden])
Date: 2005-01-18 12:52:24


I am wrapping a class "bigint" from c++ to python. I have overloaded the add
method to do something like this on python:

This works well, but if I try to do it vice versa my overloaded add method
isn't called by python:
Causes error.

My add methods look like this:
bigint add_bigint_l(bigint const& b, long_ const& l)
bigint add_l_bigint(long_ const& l,bigint const& b)

and are defined by

.def("__add__", add_bigint_l)
.def("__add__", add_l_bigint)

Can someone tell me howto realize it?

Benjamin Schmeling

GMX im TV ... Die Gedanken sind frei ... Schon gesehen?
Jetzt Spot online ansehen:

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at