1
0
mirror of https://github.com/deuill/go-php.git synced 2024-09-21 00:40:45 +00:00
go-php/context.h
Alex Palaistras 6fa93f5160 First version of variable bindings to context.
This commit contains an initial version of variable bindings
to a context, along with tests. Currently supported types are
integers, floating point numbers, and strings.
2015-09-20 01:16:43 +01:00

15 lines
553 B
C

#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);
void context_bind(engine_context *context, char *name, void *vptr);
int context_write(engine_context *context, const char *message, unsigned int length);
void context_destroy(engine_context *context);
#endif