From: "Alphex K." <alphex@crew.org.ru>
To: Glynn Clements <glynn.clements@virgin.net>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Some troubles with dynamic structures ;-(
Date: Fri, 23 Jan 2004 19:41:37 +0300 [thread overview]
Message-ID: <20040123194137.4cdb7f5a.alphex@crew.org.ru> (raw)
In-Reply-To: <16400.25735.492139.552175@cerise.nosuchdomain.co.uk>
On Fri, 23 Jan 2004 00:02:15 +0000
Glynn Clements <glynn.clements@virgin.net> wrote:
>
> Alphex K. wrote:
>
> > Where I have a mistake,
> > integers in structure work normally, but
> > I'm have a problem with pointers to char
>
> The pointers are those returned from gtk_entry_get_text(), whose
> documention says:
>
> Retrieve the contents of the entry widget. The returned
> pointer points to internally allocated storage in the widget
> and must not be freed, modified or stored. For this reason,
> this function is deprecated. Use gtk_editable_get_chars()
> instead.
>
> I take this as meaning that the data to which they point may become
> invalid at the next operation to be performed on the GtkEntry (e.g.
> the next time it receives a signal or is accessed via one of the
> gtk_entry_* functions).
>
> Use e.g. strdup() to copy the data, e.g.
>
> aname=strdup(gtk_entry_get_text(GTK_ENTRY(namecentry)));
yes it's work normally, thanx
>
> --
> Glynn Clements <glynn.clements@virgin.net>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Alphex Kaanoken
Senior developer of Crew IT research labs
web: http://crew.org.ru
mailto:Alphex@Crew.Org.RU
prev parent reply other threads:[~2004-01-23 16:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-22 20:23 Some troubles with dynamic structures ;-( Alphex K.
2004-01-23 0:02 ` Glynn Clements
2004-01-23 16:41 ` Alphex K. [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040123194137.4cdb7f5a.alphex@crew.org.ru \
--to=alphex@crew.org.ru \
--cc=glynn.clements@virgin.net \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).