Re: Problem with gtk_im_context_get_surrounding ()
- From: Havoc Pennington <hp redhat com>
- To: "Aleksey A. Malyshev" <maa sparc spb su>
- Cc: gtk-list gnome org
- Subject: Re: Problem with gtk_im_context_get_surrounding ()
- Date: 12 Feb 2002 10:14:35 -0500
"Aleksey A. Malyshev" <maa sparc spb su> writes:
>
> I have a problem with gtk_im_context_get_surrounding ().
>
> Test case:
> #include <gtk/gtk.h>
>
> int
> main (int argc, char** argv)
> {
> GtkIMContext *context;
> gint *index;
> gchar **text;
> gboolean res;
>
> gtk_init (&argc, &argv);
>
> context = gtk_im_multicontext_new ();
>
> res = gtk_im_context_get_surrounding (GTK_IM_CONTEXT(context),text ,index);
> if (res)
> printf ("\nResult True\n");
>
> }
>
> Output:
> Segmentation fault
>
>
> What's wrong in this case?
> What I am doing wrong?
"text" and "index" are uninitialized. If you turn on warnings (-Wall
flag with gcc) then your compiler will tell you these things.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]