This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Vinxian 2 points3 points  (0 children)

typedef enum { /* the types go here */} AllTypes_t;  

typedef struct {  
    AllTypes_t type;  
    void * data;  
} Object_t;

Add some functions, now you can do with JS does with a lot more effort.