Update of /cvsroot/agd/server/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3311
Modified Files:
lpc.h object.h
Log Message:
Moves program_T and function_t away from lpc.h, to object.h. Added program_t references.
Index: object.h
===================================================================
RCS file: /cvsroot/agd/server/src/object.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** object.h 12 Mar 2004 08:40:10 -0000 1.4
--- object.h 15 Mar 2004 18:49:30 -0000 1.5
***************
*** 2,9 ****
#define _OBJECT_H
! #define O_DESTRUCTED 0x1
typedef struct object_t {
char *name;
program_t *prog;
int ref;
--- 2,22 ----
#define _OBJECT_H
! typedef struct {
! int type;
! array_t args;
! array_t code;
! unsigned int lineno;
! } function_t;
!
! typedef struct program_t {
! array_t functions;
! array_t fun_table;
! int ref;
! } program_t;
!
typedef struct object_t {
char *name;
program_t *prog;
+ array_t /* * */ variables;
int ref;
***************
*** 18,24 ****
--- 31,41 ----
} object_t;
+ #define O_DESTRUCTED 0x1
+
void destruct(object_t *ob);
void ref_ob(object_t *ob, variable_t *v);
void unref_ob(object_t *ob, variable_t *v);
+ void ref_prog(program_t *prog);
+ int unref_prog(program_t *prog);
object_t *find_object(char *name);
object_t *load_object(char *name);
Index: lpc.h
===================================================================
RCS file: /cvsroot/agd/server/src/lpc.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** lpc.h 12 Mar 2004 08:40:10 -0000 1.5
--- lpc.h 15 Mar 2004 18:49:30 -0000 1.6
***************
*** 38,54 ****
} variable_t;
- typedef struct {
- int type;
- array_t args;
- array_t code;
- unsigned int lineno;
- } function_t;
-
- typedef struct program_t {
- array_t functions;
- /* array_t nametable;*/
- array_t fun_table;
- array_t variables;
- } program_t;
-
#endif
--- 38,40 ----
|