blob: 2fbc0c2e40d416daf1d06e077957efd4383f7a05 [file] [log] [blame]
/*
* Copyright (C) Dmitry Volynsev
* Copyright (C) NGINX, Inc.
*/
#ifndef _NJS_MODULE_H_INCLUDED_
#define _NJS_MODULE_H_INCLUDED_
typedef struct {
njs_str_t name;
njs_object_t object;
njs_index_t index;
njs_function_t function;
} njs_module_t;
njs_int_t njs_module_load(njs_vm_t *vm);
void njs_module_reset(njs_vm_t *vm);
njs_int_t njs_parser_module(njs_vm_t *vm, njs_parser_t *parser);
njs_int_t njs_module_require(njs_vm_t *vm, njs_value_t *args,
njs_uint_t nargs, njs_index_t unused);
extern const njs_lvlhsh_proto_t njs_modules_hash_proto;
extern const njs_object_init_t njs_require_function_init;
#endif /* _NJS_MODULE_H_INCLUDED_ */