#ifndef _MLP_C_H_ #define _MLP_C_H_ #include "../src/mlp.h" #include #include class mlp_perl_language : public mlp_language { public: mlp_perl_language() ; virtual mlp_runtime *new_runtime(mlp_context *ctx, const void *opts) ; } ; class mlp_perl_runtime : public mlp_runtime { PerlInterpreter *my_perl ; protected: virtual ~mlp_perl_runtime() ; public: mlp_perl_runtime(mlp_context *ctx, mlp_language *lang, const void *opts) ; virtual mlp_library *load_library(mlp_context *ctx, const char *name, const void *opts) ; virtual void setup_context(mlp_context *ctx) ; PerlInterpreter *_get_my_perl() ; virtual void destroy(mlp_context *ctx) ; } ; class mlp_perl_library : public mlp_library { protected: virtual ~mlp_perl_library() ; public: mlp_perl_library(mlp_context *ctx, mlp_runtime *rt, const char *name, const void *opts) ; virtual mlp_function *get_function(mlp_context *ctx, mlp_type rtype, const char *name, mlp_prototype proto) ; virtual void destroy(mlp_context *ctx) ; } ; class mlp_perl_function : public mlp_function { CV *coderef ; protected: virtual ~mlp_perl_function() ; public: mlp_perl_function(mlp_context *ctx, mlp_runtime *rt, mlp_library *lib, mlp_type rtype, const char *name, mlp_prototype proto) ; virtual mlp_value *call(mlp_context *ctx, mlp_arguments args) ; virtual void destroy(mlp_context *ctx) ; } ; SV *mlp_perl_allocate_SV(mlp_perl_runtime *rt, mlp_type t, mlp_value *v) ; mlp_value *mlp_perl_allocate_mlp_value(mlp_perl_runtime *rt, mlp_type t, SV *sv) ; #endif