#if 0'd some unused Python bridge code
This commit is contained in:
parent
ed30c9c82d
commit
e7ff3945d5
5 changed files with 14 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ namespace {
|
|||
amount.parse(str, flags);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void py_print(amount_t& amount, object out) {
|
||||
if (PyFile_Check(out.ptr())) {
|
||||
pyofstream outstr(reinterpret_cast<PyFileObject *>(out.ptr()));
|
||||
|
|
@ -86,6 +87,7 @@ namespace {
|
|||
_("Argument to amount.print_(file) is not a file object"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
annotation_t& py_amount_annotation(amount_t& amount) {
|
||||
return amount.annotation();
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ namespace {
|
|||
return balance.commodity_amount(commodity);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void py_print(balance_t& balance, object out) {
|
||||
if (PyFile_Check(out.ptr())) {
|
||||
pyofstream outstr(reinterpret_cast<PyFileObject *>(out.ptr()));
|
||||
|
|
@ -77,6 +78,7 @@ namespace {
|
|||
_("Argument to balance.print_(file) is not a file object"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
long balance_len(balance_t& bal) {
|
||||
return bal.amounts.size();
|
||||
|
|
|
|||
|
|
@ -37,12 +37,14 @@ namespace ledger {
|
|||
|
||||
using namespace boost::python;
|
||||
|
||||
#if 0
|
||||
#define EXC_TRANSLATOR(type) \
|
||||
void exc_translate_ ## type(const type& err) { \
|
||||
PyErr_SetString(PyExc_ArithmeticError, err.what()); \
|
||||
}
|
||||
|
||||
//EXC_TRANSLATOR(format_error)
|
||||
#endif
|
||||
|
||||
void export_format()
|
||||
{
|
||||
|
|
@ -55,10 +57,12 @@ void export_format()
|
|||
|
||||
//implicitly_convertible<string, amount_t>();
|
||||
|
||||
#if 0
|
||||
#define EXC_TRANSLATE(type) \
|
||||
register_exception_translator<type>(&exc_translate_ ## type);
|
||||
|
||||
//EXC_TRANSLATE(format_error);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace ledger
|
||||
|
|
|
|||
|
|
@ -66,12 +66,14 @@ namespace {
|
|||
|
||||
} // unnamed namespace
|
||||
|
||||
#if 0
|
||||
#define EXC_TRANSLATOR(type) \
|
||||
void exc_translate_ ## type(const type& err) { \
|
||||
PyErr_SetString(PyExc_ArithmeticError, err.what()); \
|
||||
}
|
||||
|
||||
//EXC_TRANSLATOR(item_error)
|
||||
#endif
|
||||
|
||||
void export_item()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,15 +48,18 @@ using namespace boost::python;
|
|||
|
||||
namespace {
|
||||
|
||||
#if 0
|
||||
account_t& py_account_master(journal_t& journal) {
|
||||
return *journal.master;
|
||||
}
|
||||
#endif
|
||||
|
||||
long xacts_len(journal_t& journal)
|
||||
{
|
||||
return journal.xacts.size();
|
||||
}
|
||||
|
||||
#if 0
|
||||
xact_t& xacts_getitem(journal_t& journal, long i)
|
||||
{
|
||||
static long last_index = 0;
|
||||
|
|
@ -119,6 +122,7 @@ namespace {
|
|||
|
||||
return *(*elem).second;
|
||||
}
|
||||
#endif
|
||||
|
||||
account_t * py_find_account_1(journal_t& journal, const string& name)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue