pike.git
/
src
/
program.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.h:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /*
-
* $Id: program.h,v 1.
136
2001/07/
09
14
:
19
:
16
grubba
Exp $
+
* $Id: program.h,v 1.
137
2001/07/
12
23
:
15
:
41
hubbe
Exp $
*/ #ifndef PROGRAM_H #define PROGRAM_H #include <stdarg.h> #include "global.h" #include "pike_types.h" #include "pike_macros.h" #include "svalue.h" #include "time_stuff.h"
pike.git/src/program.h:272:
/* Program is in an inconsistant state */ #define PROGRAM_AVOID_CHECK 0x400 /* Program has not yet been used for compilation */ #define PROGRAM_VIRGIN 0x800 /* */ #define PROGRAM_NEEDS_PARENT 0x1000
-
enum
pike_program_event
-
{
-
PROG_EVENT_INIT
=
0
,
-
PROG_EVENT_EXIT
,
-
PROG_EVENT_GC_RECURSE
,
-
PROG_EVENT_GC_CHECK
,
-
NUM_PROG_EVENTS
,
-
};
+
/* Using define instead of
enum
allows for ifdefs - Hubbe */
+
#define
PROG_EVENT_INIT 0
+
#define
PROG_EVENT_EXIT
1
+
#define
PROG_EVENT_GC_RECURSE
2
+
#define
PROG_EVENT_GC_CHECK
3
+
#define
NUM_PROG_EVENTS
4
/* These macros should only be used if (p->flags & PROGRAM_USES_PARENT) * is true */ #define LOW_PARENT_INFO(O,P) ((struct parent_info *)(PIKE_OBJ_STORAGE((O)) + (P)->parent_info_storage)) #define PARENT_INFO(O) LOW_PARENT_INFO( (O), (O)->prog) struct parent_info { struct object *parent;
pike.git/src/program.h:317:
INT16 flags; /* PROGRAM_* */ unsigned INT8 alignment_needed; struct timeval timestamp; struct program *next; struct program *prev; struct program *parent; struct node_s *(*optimize)(struct node_s *n);
-
void (*event_handler)(
enum pike_program_event
);
+
void (*event_handler)(
int
);
#ifdef PIKE_DEBUG unsigned INT32 checksum; #endif #ifdef PROFILING unsigned INT32 num_clones; #endif /* PROFILING */ size_t total_size; #define FOO(NUMTYPE,TYPE,NAME) TYPE * NAME ;
pike.git/src/program.h:401:
int sizeof_variable(int run_time_type); void check_program(struct program *p); struct program *end_first_pass(int finish); PMOD_EXPORT struct program *debug_end_program(void); PMOD_EXPORT size_t low_add_storage(size_t size, size_t alignment, ptrdiff_t modulo_orig); PMOD_EXPORT void set_init_callback(void (*init)(struct object *)); PMOD_EXPORT void set_exit_callback(void (*exit)(struct object *)); PMOD_EXPORT void set_gc_recurse_callback(void (*m)(struct object *)); PMOD_EXPORT void set_gc_check_callback(void (*m)(struct object *));
-
void pike_set_prog_event_callback(void (*cb)(
enum pike_program_event
));
+
void pike_set_prog_event_callback(void (*cb)(
int
));
void pike_set_prog_optimize_callback(struct node_s *(*opt)(struct node_s *)); int low_reference_inherited_identifier(struct program_state *q, int e, struct pike_string *name, int flags); int find_inherit(struct program *p, struct pike_string *name); node *reference_inherited_identifier(struct pike_string *super_name, struct pike_string *function_name); void rename_last_inherit(struct pike_string *n); void low_inherit(struct program *p,