Push a script in a buffer into the rq_store.
This has to be done after tem_require_rq_store, any values put into the store before the call to tem_require_rq_store will be discarded.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(flu_State) | :: | L | ||||
character(len=*), | intent(in) | :: | modname |
Name of the module to store. |
||
character(len=*), | intent(in) | :: | filename |
Original file name. |
||
character(len=1), | intent(in) | :: | buffer(:) |
Actual buffer holding the code. |
subroutine tem_push_to_rq_store(L, modname, filename, buffer) ! --------------------------------------------------------------------------- !> type(flu_State) :: L !> Name of the module to store. character(len=*), intent(in) :: modname !> Original file name. character(len=*), intent(in) :: filename !> Actual buffer holding the code. character, intent(in) :: buffer(:) ! --------------------------------------------------------------------------- integer :: store_handle integer :: list_handle integer :: iError ! --------------------------------------------------------------------------- call aot_table_open( L = L, & & thandle = store_handle, & & key = "rq_store" ) ! Set the filename. call aot_table_open( L = L, & & parent = store_handle, & & thandle = list_handle, & & key = "file" ) call aot_table_set_val( val = trim(filename), & & L = L, & & thandle = list_handle, & & key = trim(modname)) call aot_table_close(L, list_handle) ! Set the execution code. call aot_table_open( L = L, & & parent = store_handle, & & thandle = list_handle, & & key = "code") iError = fluL_loadbuffer(L, buffer, trim(modname)) call aot_table_set_top( L = L, & & thandle = list_handle, & & key = trim(modname)) call aot_table_close(L, list_handle) call aot_table_close(L, store_handle) end subroutine tem_push_to_rq_store