Re: OFFTOPIC: recursive typedef
- From: Jeroen Benckhuijsen <jfbenck home nl>
- To: gtk-app-devel-list gnome org
- Subject: Re: OFFTOPIC: recursive typedef
- Date: 01 Mar 2001 01:47:34 +0100
On 01 Mar 2001 01:33:33 +0000, Carlos Pereira wrote:
I have this function type definition:
typedef void (*NxpElementIterateFunc) (NxpElement *elem,
gpointer func,
gpointer user_data);
but what I would really like is:
typedef void (*NxpElementIterateFunc) (NxpElement *elem,
NxpElementIterateFunc func,
gpointer user_data);
Can it be done in C?
Thanks in advance.
I doubt, at least from my experience.
You can use this:
typedef struct _app_object {
void (*function) (struct _app_object *);
struct _app_object *next, *before; } app_object;
but not this:
typedef struct _app_object {
void (*function) (app_object *);
app_object *next, *before; } app_object;
Carlos
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
AFAIK ,it can't be done. Don't think any programming language will allow
this, The type has to be know before it can be used... Just curious,
what purpose will it serve?
--
Jeroen Benckhuijsen
Software Engineer
Phoenix Software
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]