Re: fun project!
- From: "Greg Haerr" <greg censoft com>
- To: <gtk-devel-list redhat com>
- Subject: Re: fun project!
- Date: Thu, 27 Apr 2000 10:26:57 -0600
: i think we should keep magic commenting to the minimum possible,
: if at all, so we better make sure the default choosen apply to the
: commmon case. for strings specifically this means:
: - returned strings usually do not need to be freed
: - strings can most often be passed as NULL, (tooltips, label text...)
: - returned strigs may be NULL
My $.02 on this. I've solved this sort of problem before by
changing the function signature itself through the use of
typedefs. Then, when a midl compiler or other utility
is used to gain knowledge of marshalling requirements,
no additional data is required.
typedef char gchar;
typedef char gcharmalloc;
typedef char gcharnofree;
gcharnofree * gtk_type_name(GtkType type);
This method makes it obvious to both the programmer and
the CORBA tools what's happening. I realize it's probably
way too late to change GTK headers like this, but I thought
I'd post this anyway.
Regards,
Greg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]