a question about glib command option parser
- From: jiangxingfeng <jiang x f huawei com>
- To: gnome-list gnome org
- Subject: a question about glib command option parser
- Date: Thu, 19 Mar 2009 13:38:35 +0800
Hello, folks:
I try to use glib to make my work convenient. After reading manual, I have several questions.
1. there is a API as follows:
gboolean g_option_context_parse (GOptionContext *context,
gint *argc,
gchar ***argv,
GError **error);
if the function return FAIL, it will give some information in error parameter. But from example listed in the manual, caller is not required to allocate memory to hold error message. so my question is: does the caller have to call free function to free the memory allocated in the API?
2. a similar question for the following API. Does the caller have to free the memory pointed by argvp, error?
gboolean g_shell_parse_argv (const gchar *command_line,
gint *argcp,
gchar ***argvp,
GError **error);
Any advice is appreciated.
Regards
Jiang XingFeng
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]