2015-09-17 21:22:07 +00:00
|
|
|
#ifndef CONTEXT_H
|
|
|
|
#define CONTEXT_H
|
|
|
|
|
|
|
|
typedef struct _engine_context {
|
|
|
|
php_engine *engine; // Parent engine instance.
|
|
|
|
void *parent; // Pointer to parent Go context, used for passing to callbacks.
|
|
|
|
} engine_context;
|
|
|
|
|
|
|
|
engine_context *context_new(php_engine *engine, void *parent);
|
|
|
|
void context_exec(engine_context *context, char *filename);
|
2015-09-20 00:16:43 +00:00
|
|
|
void context_bind(engine_context *context, char *name, void *vptr);
|
2015-09-19 20:12:32 +00:00
|
|
|
int context_write(engine_context *context, const char *message, unsigned int length);
|
2015-09-17 21:22:07 +00:00
|
|
|
void context_destroy(engine_context *context);
|
|
|
|
|
|
|
|
#endif
|