summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-08 16:46:50 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-12-09 14:34:41 -0200
commit5b59c65a0f39198c4613400b9a49000b7d2315de (patch)
treedcbf995bd52d775cc3698d9bfdc50d203308b490
parentff592945dbf0cb990ca13d60f480eeead7e34a99 (diff)
downloadshiboken-5b59c65a0f39198c4613400b9a49000b7d2315de.tar.gz
shiboken-5b59c65a0f39198c4613400b9a49000b7d2315de.tar.xz
shiboken-5b59c65a0f39198c4613400b9a49000b7d2315de.zip
Added another overload for makeTuple, this time with just one argument.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--libshiboken/helper.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libshiboken/helper.h b/libshiboken/helper.h
index 9aa06ffe..52b41270 100644
--- a/libshiboken/helper.h
+++ b/libshiboken/helper.h
@@ -1,7 +1,7 @@
/*
* This file is part of the Shiboken Python Bindings Generator project.
*
- * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
*
* Contact: PySide team <contact@pyside.org>
*
@@ -31,6 +31,12 @@
namespace Shiboken
{
+template<typename A>
+inline PyObject* makeTuple(const A& a)
+{
+ return PyTuple_Pack(1, AutoDecRef(Converter<A>::toPython(a)).object());
+}
+
template<typename A, typename B>
inline PyObject* makeTuple(const A& a, const B& b)
{