Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby32/include/ruby
File: vm.h
#ifndef RUBY_VM_H /*-*-C++-*-vi:se ft=cpp:*/
[0] Fix | Delete
#define RUBY_VM_H 1
[1] Fix | Delete
/**
[2] Fix | Delete
* @file
[3] Fix | Delete
* @author $Author$
[4] Fix | Delete
* @date Sat May 31 15:17:36 2008
[5] Fix | Delete
* @copyright Copyright (C) 2008 Yukihiro Matsumoto
[6] Fix | Delete
* @copyright This file is a part of the programming language Ruby.
[7] Fix | Delete
* Permission is hereby granted, to either redistribute and/or
[8] Fix | Delete
* modify this file, provided that the conditions mentioned in the
[9] Fix | Delete
* file COPYING are met. Consult the file for details.
[10] Fix | Delete
*
[11] Fix | Delete
* We planned to have multiple VMs run side-by-side. The API here was a
[12] Fix | Delete
* preparation of that feature. The topic branch was eventually abandoned, and
[13] Fix | Delete
* we now have Ractor. This file is kind of obsolescent.
[14] Fix | Delete
*/
[15] Fix | Delete
#include "ruby/internal/dllexport.h"
[16] Fix | Delete
[17] Fix | Delete
RBIMPL_SYMBOL_EXPORT_BEGIN()
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* The opaque struct to hold VM internals. Its fields are intentionally hidden
[21] Fix | Delete
* from extension libraries because it changes drastically time to time.
[22] Fix | Delete
*/
[23] Fix | Delete
typedef struct rb_vm_struct ruby_vm_t;
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Destructs the passed VM. You don't have to call this API directly now,
[27] Fix | Delete
* because there is no way to create one. There is only one VM at one time.
[28] Fix | Delete
* ruby_stop() should just suffice.
[29] Fix | Delete
*/
[30] Fix | Delete
int ruby_vm_destruct(ruby_vm_t *vm);
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* ruby_vm_at_exit registers a function _func_ to be invoked when a VM
[34] Fix | Delete
* passed away. Functions registered this way runs in reverse order
[35] Fix | Delete
* of registration, just like END {} block does. The difference is
[36] Fix | Delete
* its timing to be triggered. ruby_vm_at_exit functions runs when a
[37] Fix | Delete
* VM _passed_ _away_, while END {} blocks runs just _before_ a VM
[38] Fix | Delete
* _is_ _passing_ _away_.
[39] Fix | Delete
*
[40] Fix | Delete
* You cannot register a function to another VM than where you are in.
[41] Fix | Delete
* So where to register is intuitive, omitted. OTOH the argument
[42] Fix | Delete
* _func_ cannot know which VM it is in because at the time of
[43] Fix | Delete
* invocation, the VM has already died and there is no execution
[44] Fix | Delete
* context. The VM itself is passed as the first argument to it.
[45] Fix | Delete
*
[46] Fix | Delete
* @param[in] func the function to register.
[47] Fix | Delete
*/
[48] Fix | Delete
void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
[49] Fix | Delete
[50] Fix | Delete
RBIMPL_SYMBOL_EXPORT_END()
[51] Fix | Delete
[52] Fix | Delete
#endif /* RUBY_VM_H */
[53] Fix | Delete
[54] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function