aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken/helper.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-29 15:25:07 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:08:54 -0300
commit0e0331dd62afb53005a08f2f5e22a631204110e6 (patch)
tree8c6a0b55c8911692be8fc53721d28c1df8abac57 /libshiboken/helper.h
parent2cc7283b09b77b61bda1f7bc5fa75069975d50ff (diff)
Fix function PySequenceToArgcArgv to support unicode strings.
Also fix some reference leaks. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'libshiboken/helper.h')
-rw-r--r--libshiboken/helper.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/libshiboken/helper.h b/libshiboken/helper.h
index 363409076..a06304123 100644
--- a/libshiboken/helper.h
+++ b/libshiboken/helper.h
@@ -67,12 +67,20 @@ inline PyObject* makeTuple(const A& a, const B& b, const C& c, const D& d, const
/**
* It transforms a python sequence into two C variables, argc and argv.
-* If the sequence is empty and defaultAppName was provided, argc will be 1 and
-* argv will have a copy of defaultAppName.
+* This function tries to find the application (script) name and put it into argv[0], if
+* the application name can't be guessed, defaultAppName will be used.
*
-* \note argc and argv *should* be deleted by the user.
+* No memory is allocated is an error occur.
+*
+* \note argc must be a valid address.
+* \note The argv array is allocated using new operator and each item is allocated using malloc.
* \returns True on sucess, false otherwise.
*/
+LIBSHIBOKEN_API bool sequenceToArgcArgv(PyObject* argList, int* argc, char*** argv, const char* defaultAppName = 0);
+
+/**
+ * \deprecated Use sequenceToArgcArgv instead.
+ */
LIBSHIBOKEN_API bool PySequenceToArgcArgv(PyObject* argList, int* argc, char*** argv, const char* defaultAppName = 0);
/**