aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
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>2012-03-08 16:12:08 -0300
commit8dfeff8c11077f2f504476e282b11c3ca0a8cd83 (patch)
tree8902a16ca9e27fd843d20448b9415df5ea14e6ff /libshiboken
parentfbde5bbaf584e87ca55045985039e53268f0c92c (diff)
Added another overload for makeTuple, this time with just one argument.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/helper.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libshiboken/helper.h b/libshiboken/helper.h
index 9aa06ffe6..52b41270f 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)
{