Re: OFFTOPIC: recursive typedef



Hi,

I think you can do it with LISP but not with C.

On Wed, 28 Feb 2001, you wrote:
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

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
-- 
____________________________________

Stephane Duguay
Software Designer stagiaire
Matrox Graphics Inc.

E-Mail : sduguay matrox com
Tel. : (514) 822-6000 ext. 7331
Fax : (514) 685-7030
____________________________________




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]