����C %# , #&')*)-0-(0%()(��C (((((((((((((((((((((((((((((((((((((((((((((((((((����"�������@�@�hC��}!���Ѱ��<"� 9iׂIIIHk�+?�c?��*Y�����!�du)b�T�9вU�$8G��I.�澬��D���Sq� q�}.<��Z�l�V!X� *x�-�\����t3i�Ũ�sNv71�ƛ\��z|t�L���$�����*f��kʮ��7�H;���~F%�'3�@�H�q�` 9mOL����/x@ @��G
d�8F�ه��Ka�Kdr�Fh.�]y4 JЛ��]�K�B�E$��$ $ �PR�����G�]��u�i$�$���'! "#031���C/Td=S�Q?���62Ccj{ ����̏d�چ/c�V�`��Wz͈�{Y`�d�h�L �]OB���l���o���mr���n��s-ڗEZ��N�_��1%b���H�ϣ������V�7):�ӷ)�}�~�(�;�!�b1�5K��[E�vϻ>��q.%� ���O���(�c�#x�$�'+��`٥v��v(�����M�"�v��B��.�a ���T�~�ϕ�hy(6nݱl��1yNɓx�������AR�8�rqv1.cS�+��_���&@�� �u�M�5Ĉ�Xm���eL�X�q��y#�9]�c�}ɄL��d�eJ몓���I1T�d��CaM�$��T�,�X �bʭ�!�%F5��X1x#���!�q��\��F��2��&Rq���C�ol~�̱�.0ϦL�d�`.������ ���m{�Y~k{C��}bv�;U��c<�r�~ɜs�1�j��]W�l��*նCr��Q�N9�-������d��E؛��nF��eړ�8(q��5UgRȱGTA��*������̆��V�珰����ezN��h�U]�T�FG�^���<��ay�,!���5.� �u�bΚ�V�J%��m�Dxn'�����6�@BPa�`��Hts� �ɮ���Ŏ�Zɬ��%B�X��d5Z���hC}�䅸�p+ k=��ʒ(�aՏFG&�%@/�{+�Yu+�ȣGѩ"O%�|vȲxF>�N(��ou�h6 &Y5��8�7�E$-��']n,@TD\��+���Ry�U��U^�Q,f>��1�����q��f��U��� ����F���ڥ��>I�����fNUw�u��#OMMQ6� N�*��_�� k� ����rS��`���1�:��!�F'<+� � b?O��2 !Q12A��� "3a������#$��?�,�7�!`yǮ(�1�6w��a���� �F�#��?*"s���v>��Ⱥ����f�v��͑���s����������]Gn��S ���ȥpG ы�E�g�)Z���x�rY�q�]�@f�_܃�pչEڎّC ����Ŝ*/ �h�O�Sv�و\��5��U��y��|o�Hm2C�S�BW����)��5��{T��W���=o*RA��<����L0g4{��쁢�ep�rw�8��7��U���t<Ԍѻ7�fGf�k}���Ê�㛆Gռz�Q@��{C��'G��8�!�S$�j��x���|���צV<��,����u�k�uu�rM�f�_dϣi ߫�ԟn�!K����mxu�=�槻�'j�X�����������%!A "1QR#Br��?�R:��R�n�b[�II?#��6<:�$gN����lGNlrr��dעMMn`ɿy�,�%B�e�W��dVS��r���� %�tT��(�ɷ��S�]�O]#�_LEMHN�M���kv���~X���O6�U�V_�����b���J�t�774����D!1AQa"2q�#3BRb����0���� 4CSr����cst�����?��^q���7�dG�U�"p��moz��'��n_x���唹e������<6��O�t���R>k��s=�Cr���e�?�i��� ����/��ں$be���o`ޮ�GHy�;fNAl�8��.�\�S������"���a�úF�YvNk�-*`v�k�ʈ2f�EE��Wa�,� �fF^#�;��[9��^~������Y$:0#W3������Z*���I�Z�ڹ�k�n--9=��G��;7F)m{T�Ɇ��=�����Ȭ5�5�B�aڞ5M����#m�5Ʀ��m�8��+Hh���$�}�:&�e�Q�[;i]С�:�:��o����$<~��5RB�?�s3�5�r��O��ֿ�w�P/��̅���(�Z6�R>)��N��4�!ʊ�wz�-�r�w+�yk���q�1�bKhƸ�4N�Ӑ�X����Q��_��})�+e1�5��n��q?��[�^�9�<�z3Fsi�8�'�)9p)�{��RP�Z+�*��p(aY��V����6l�g�9��;���d�u���Nt@�3�sTwzaŇ�GT�b�H��(#��*zc�������9K�b1�����t����Ê��
�Z?g�iD���H�R���B���^M����v���O���L�D,'d�q�C�P�����$Δ��U�֟֊=�s��F�$��J�ދZ?�N��������A�N�WP��,�� �¦�&;�x��dup�����i���Ipd���;�Dž!��ֿѮAb%�u��}j��-p��>I�[�N�bi����G�'�;4w�m]H�]����#LӘNN��R��������s�.]��en��-�8e��Ps����Q��;���ț�E�ݫ���7��g�_L��W��EZ:/��I���a�g�n�ܤ��iٹ���ŷ�T���H~i�a�����֎�~KV������ A-2m]�F"�m�9-Zbǰ�״ @����~�4�N�[�Uxč�tl>������u#r�gѐ�3���;M9�<�J�����1�vfL8����1�P�HgP�Xv��������{����O�}�n��KQ؋����7<�l�fey<�}�>�bX���4<`Y7���si��V)�s�:�{�rO�h�z �@4VW�B���&�������ɡob܋�F��4>y�s�fXWS�N�O$�,.u:�ԫ��g�yao4��$h��D#��ٸf^kh�7�#1Z�֥&���*�v-��;bޭ����Q�����h�ow�y]�ه.+�7�M�ⴻ �JY��g�f�i3q��KC��3�¹�?5�Z.N��^Z w���KF͂���7��ރ۞��wj��T�J.�q��\Sv1U����R��욽&�N����pЖ`�`у��m`v�n#z��4��>e��V�`'���h�����'�j�AҔ�-�4:H���n]9�h<��n����U�6m��2c�E�1/�Y�%���I��~ʏ�|VBƟ@����;�������%�M9M���}��1�D��d����%g���O��]��у&�r��f�7�uܲ���(!1AQaq�������0� ���?!��*��@)�Je�G��j��{�['��v+���������)���(�/����д%젍Z��kk�Lu�Rm���j.c���@Z� V�J��d��j���h6���2AO�� a;oBu���H�=���nK�W8�B�ɰ�u?��бأm,�sr����|����8˨i��qI2tZ�ۄJP��XE��������zޔj~]UMu����zv!����N�&�1�Y��zJ�ՠ��\p��o'ሸ�C؊Y��TD"HM5�Ъ��i߯a���F����A)�����ڮ����z�E���@�hg�֝8�1jk��\�M�3�8ܢ�� ������s�7����N}�ޭ������GN�Bc���L pk�;�J�δ3�e�iU�gAYW]\�>�GyگQ=��f�KA;T�a`eM+Q �� �Ln���̌]GM�����<Ħ�j���H��N�M�x�}aX{̣S� ��ԅ��n�MA�S�r�(����(�L��zo9���.�;
�ӳf������`Ӕ٢3�� IW��\9~_���saa�\ԊW�ܭX:���ӆ�38�ty*����N�qP����BI�Y��jE��>DP�!�R%-��4��'�皺;��~J�!�7m���X��h�P!曭���$�\�AYj�.lC��4��+�jD�dgC0-*���|��`ZD�+л�C"��)��s��8Kq�pq���Ms��4� ��7\U`�.��[Ey8��AH!/��,���(:M -�T䓥�~O�4-���Ԓn��}HDN7���K���$�_Ԕ䚞`�R�hB�_aX?4V��ŗ�@ه�u�a�;�{PcT+�������7YBo�?��r-ͩ{�ĎA�� ����˼n��M286��G���1���V�˜Jв"l��V5���5�C]h���̊�A���%� �'p���Ԃ���Ր��9=�d�=�e�{�'<3�_ �:^�~��4�(�n�-C�s��5m![�jmIqU�~�Tw8��`���p�H8�u�Д l m�aP�0�������9y����CM��F1G糞�.�U~�������FC�{�!e(Y�:���P����7~;�L�N^{�1r�\���ԬG(���0d�ÏO�qK�Z�⑼�T�{ 2��s��Kd�Տ?mMQ��=���6�7�i�����H+����9��d��=��;�QؤH8n�Lb�D��yS%�(�{b���Cu���p�t#C���$A"�H{���jqᶯ�:�n=E����hH�`�!�m��MA������?�v6���+MԿ⟚qK�i�D�*Q5��CZ���2�|]�:Xd+�t�:o@��M��� :�32��b����[\5=�ֵ7])�|t��Ϻ����w�B�ń�e���!`�:��I,��9:����j@/a 8����+<�u�(T^ۺ~��2oE�B�%b)��z��ݳځ�)��i�j��&��Fi`qr��w���7�@��P�� �3Z&<�m�S�C����7t�T����ƴ�q~J�e�r6�Z]�rL���ه�E17'�x���+[�ܜTc6�/�����W�`�qpMJ���N5^����x�}{l�Fm������1�oZ\�����/d�/6� �uӸ�0elXuX;M��$M�}mB��������Z%e���3f�js����O�J~2�z�86�*PB��v�Ν��e-��.�/��L�O����2����9���4}|��T5M���hÐ7�F*��l+y0����:|��=k[�d�;|�ԉe�=w�<��õ�<��'!1AQaq����� ������?��5����)�(���+>v����6&{���Ǹ@����M�����v��iA 6T'�w��h�s �E}�x��G&'g�� J~1q�f�f���&��q˘���-���vYm
�/i1 �I��6��u,)�#�,����l}*&`�$�ͬe�%�w3�x�Ѥ�Xc�D��执g�峕�5B/�|$��=���%8 a��2.l� c�@G� �\�/x[өq�]�v5?�����N|�!���\��,>��{�"r�/��?��&!1QAa�� ��ᑱ����?ĊD�肭�� nv@�yޝ (�����I ����U - ���b�m�E>,��1v!�d�&�� ���&�檔�5D�&0P��Ԕ�͒@Z��:E"� Q��`>PH:~�O�����P�3W��@hM��k�U��\�O��R�������5ʄ�,��f�|��r���}јxo)�"+h�QK���/��0�`�5�{M~�� ���'!1AQaq���0 �������?�?�k��#^�~�G��#V,������#Z�1'ܤ����������~p�O%O�O�\�q�`�~��}��E�Ű5 �輸�du����x\�$���s[�{T2t`B��gq�4Z]b� 㛪�3,(@����bAp�r)9:@|b�!r�g:N�^�Ʌ��� �x_�\��pm7I��0?>^k��������w���|.K�[sF@�]Gn*L �yO� le�P�.p��֍�j�S�=�ʨ�ןQF�"��5zʼn���k�*8�u" ����Fg��� �cSy�V������Ƈ��N��ؐ(�����48hV�A�ӎ^��^ ���jyB� ��p"�����y]�ļlU�(�7�U`3�pCGF'&yg������o��z������X��ν:�P"@�G@x[��o&MJ�$F.����hi w;}�/^͇q���n�mN�/�TQ���އ��O1\,}��bQ #¯^S!)��X���#GPȏ�t�� c^\��' }iIZ���a�)��������z��4͊�Ξy��48,��f���#�����KP!Jx�|w�ʆ�������������#��Z�������< �~K��r�p&qH/;�R���沽�+�E�R���~0v���V#ʀ�T��S(-ڝ��B�y�b�C�D������b��������8��~�= �Y�ͧ]��@n����M�k2�%�;�%,�r6�LR腻?^��;KŇ=�ք ���=`�ɥ��/����z�&�I{���#J��M���C��}�H9^UJ�,P ��pS����G�d69Ϭu���%"��ˢP��K�"k)��=��9� ����㇌,��Oli��Xzh� " � ������R��^�s����N�k��Q>�63(���� ��PQ�Py�����3����$f+W՛=4�ǁ`*��^��Eb�K�t�6��^��!�籷��ȭ��K{/;�L���p�x�����;a���Oلz�[�.NP4�]Gc�T�v����~sg'LED��]j��'�G�]�6rY����UPw�*O�İՋi�'8�۴�#g�Xx+=�eU6�R��c�"�u2��~�?n�y�;�u��3�'��6�f������b��߬M�$*��k&?6���*^1n����ێz)<��Gz� �����7����Y� ��ۃ)$A��2�L6� ե�H�<�r��#ʽ2��O��R���z�A��XW��@���������<�G� Ϥ�^�˓i�M�W���6 ��0��m){c�;ݧ�>R�a����}1�ٯ%�EY2�Q��Ep���$ ��E��qS��t#+x� *�h�UI��XM?�'//��a'�G�����q@���<��z��؟����cd��z�ˬT_u�Ѯ����&�z�k ��n ]�a%�py»�`Qd�xc������n�� ��*��oTd�;'j�<�!j���'�(~�ʹW�M� P�mȘ��@֨V+��R�`�$��`�+@��_[�kG����P���Zh9�R����&5b�v���Z���#p�&�Ա+��8�etZ7G���;��@"�e0���v7����?��z�?_���_�q1�T�"�p�ˎ/U 6_�B�>��0( ��}G#������Ȣ�p�� �9��;/& `�B&$�y��t(�*z�x���Ӕ������S�?Kȏ3���{p� b � ۍ-�z܈֦��6?<���ǬP�N�G �更� �6�/h�����0Z���������i�ua��e�*M'A� �x��v�q.>�F� oN{��Q���{gD��L��u��=|���O xN���d���q�8(��E�Uu��,��O� t�DJ ����;��G����e���C��VYZ�� ���T4{����(�Ӳ'c�t�f��w�c�jr�e�m �#7,�6��B�E4Q�P�.P�(&��^{9H-�m�o ��q�g1���=��>p�)/"p0!4�mS6ú�FN���h��D �)��XdT �FؤZ⸚�k���H�c8v� <���u�P�Հ���:��_�EN��|�ӛ��u?-�/�o�Lhk�ܸ�S�;�Rī�����T"�N����M��px7<�� j�$��`�Y)Pjh 5` K�Qf�4�C�bX"�D���;HD�Z�9R b�F)�UA����v�#��HD�!{������>I� �`�ԁ i�4�)t*�ç�Le�_���>ru�GEQg��ǔct��ō0��l6v���d�� ��GG8���v^�|�#JyZPSO�� Y�CuAߐ�"�x���OfHF@�K�V�!少Eҕ]h� ��[���)��.q����*0I<8��^�6�}p��^tho���ig�i����DK���p,��2�3�I��5����쓄OY�6s7Qs�Ow^�w�J/�A➰������0������g(Մ��y��Kԇ����QS��?H���w�X�=��ҞX�~���Q=�'���p?7�@g�~�G�}�r��g�T?���
One Hat Cyber Team
One Hat Cyber Team
Your IP :
18.188.226.184
Server IP :
162.0.235.113
Server :
Linux premium146.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software :
LiteSpeed
PHP Version :
5.6.40
Buat File
|
Buat Folder
Dir :
~
/
opt
/
alt
/
ruby34
/
include
/
ruby
/
internal
/
intern
/
View File Name :
vm.h
#ifndef RBIMPL_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_VM_H /** * @file * @author Ruby developers <ruby-core@ruby-lang.org> * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. * @warning Symbols prefixed with either `RBIMPL` or `rbimpl` are * implementation details. Don't take them as canon. They could * rapidly appear then vanish. The name (path) of this header file * is also an implementation detail. Do not expect it to persist * at the place it is now. Developers are free to move it anywhere * anytime at will. * @note To ruby-core: remember that this header can be possibly * recursively included from extension libraries written in C++. * Do not expect for instance `__VA_ARGS__` is always available. * We assume C99 for ruby itself but we don't assume languages of * extension libraries. They could be written in C++98. * @brief Public APIs related to rb_cRubyVM. */ #include "ruby/internal/attr/nonnull.h" #include "ruby/internal/attr/noreturn.h" #include "ruby/internal/dllexport.h" #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* vm.c */ /** * Resembles `__LINE__`. * * @retval 0 Current execution context not in a ruby method. * @retval otherwise The current line number of the current thread of the * current ractor of the current execution context. */ int rb_sourceline(void); /** * Resembles `__FILE__`. * * @retval 0 Current execution context not in a ruby method. * @retval otherwise The current source path of the current thread of the * current ractor of the current execution context. * @note This may or may not be an absolute path. */ const char *rb_sourcefile(void); /** * Resembles `__method__`. * * @param[out] idp Return buffer for method id. * @param[out] klassp Return buffer for class. * @retval 0 Current execution context not in a method. * @retval 1 Successful return. * @post Upon successful return `*idp` and `*klassp` are updated to have * the current method name and its defined class respectively. * @note Both parameters can be `NULL`. */ int rb_frame_method_id_and_class(ID *idp, VALUE *klassp); /* vm_eval.c */ /** * Identical to rb_funcallv(), except it returns ::RUBY_Qundef instead of * raising ::rb_eNoMethodError. * * @param[in,out] recv Receiver of the method. * @param[in] mid Name of the method to call. * @param[in] argc Number of arguments. * @param[in] argv Arbitrary number of method arguments. * @retval RUBY_Qundef `recv` doesn't respond to `mid`. * @retval otherwise What the method evaluates to. */ VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv); /** * Identical to rb_check_funcall(), except you can specify how to handle the * last element of the given array. It can also be seen as a routine identical * to rb_funcallv_kw(), except it returns ::RUBY_Qundef instead of raising * ::rb_eNoMethodError. * * @param[in,out] recv Receiver of the method. * @param[in] mid Name of the method to call. * @param[in] argc Number of arguments. * @param[in] argv Arbitrary number of method arguments. * @param[in] kw_splat Handling of keyword parameters: * - RB_NO_KEYWORDS `argv`'s last is not a keyword argument. * - RB_PASS_KEYWORDS `argv`'s last is a keyword argument. * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block. * @retval RUBY_Qundef `recv` doesn't respond to `mid`. * @retval otherwise What the method evaluates to. */ VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat); /** * This API is practically a variant of rb_proc_call_kw() now. Historically * when there still was a concept called `$SAFE`, this was an API for that. * But we no longer have that. This function basically ended its role. It * just remains here because of no harm. * * @param[in] cmd A string, or something callable. * @param[in] arg Argument passed to the call. * @param[in] kw_splat Handling of keyword parameters: * - RB_NO_KEYWORDS `arg`'s last is not a keyword argument. * - RB_PASS_KEYWORDS `arg`'s last is a keyword argument. * - RB_PASS_CALLED_KEYWORDS it depends if there is a passed block. * @return What the command evaluates to. */ VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat); /** * Identical to rb_funcallv(), except it takes Ruby's array instead of C's. * @param[in,out] recv Receiver of the method. * @param[in] mid Name of the method to call. * @param[in] args An instance of ::RArray. * @exception rb_eNoMethodError No such method. * @exception rb_eException Any exceptions happen inside. * @return What the method evaluates to. * @pre `args` must be an ::RArray. Call `to_ary` beforehand when * necessary. */ VALUE rb_apply(VALUE recv, ID mid, VALUE args); /** * Evaluates a string containing Ruby source code, or the given block, within * the context of the receiver. In order to set the context, the variable * `self` is set to `recv` while the code is executing, giving the code access * to `recv`'s instance variables and private methods. * * When given a block, `recv` is also passed in as the block's only argument. * * When given a string, the optional second and third parameters supply a * filename and starting line number that are used when reporting compilation * errors. * * @param[in] argc Number of objects in `argv` * @param[in] argv C array of 0 up to 3 elements. * @param[in] recv The object in question. * @return What was evaluated. */ VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv); /** * Executes the given block within the context of the receiver. In order to * set the context, the variable `self` is set to `recv` while the code is * executing, giving the code access to `recv`'s instance variables. Arguments * are passed as block parameters. * * @param[in] argc Number of objects in `argv` * @param[in] argv Arbitrary parameters to be passed to the block. * @param[in] recv The object in question. * @return What was evaluated. * @note Don't confuse this with rb_obj_instance_eval(). The key * difference is whether you can pass arbitrary parameters to the * block, like this: * * ```ruby * class Foo * def initialize * @foo = 5 * end * end * Foo.new.instance_exec(7) {|i| @foo + i } # => 12 * ``` */ VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv); /** * Identical to rb_obj_instance_eval(), except it evaluates within the context * of module. * * @param[in] argc Number of objects in `argv` * @param[in] argv C array of 0 up to 3 elements. * @param[in] mod The module in question. * @pre `mod` must be a Module. * @return What was evaluated. */ VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod); /** * Identical to rb_obj_instance_exec(), except it evaluates within the context * of module. * * @param[in] argc Number of objects in `argv` * @param[in] argv Arbitrary parameters to be passed to the block. * @param[in] mod The module in question. * @pre `mod` must be a Module. * @return What was evaluated. */ VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod); /* vm_method.c */ /** * @private * * @deprecated This macro once was a thing in the old days, but makes no sense * any longer today. Exists here for backwards compatibility * only. You can safely forget about it. */ #define HAVE_RB_DEFINE_ALLOC_FUNC 1 /** * This is the type of functions that ruby calls when trying to allocate an * object. It is sometimes necessary to allocate extra memory regions for an * object. When you define a class that uses ::RTypedData, it is typically the * case. On such situations define a function of this type and pass it to * rb_define_alloc_func(). * * @param[in] klass The class that this function is registered. * @return A newly allocated instance of `klass`. */ typedef VALUE (*rb_alloc_func_t)(VALUE klass); /** * Sets the allocator function of a class. * * @param[out] klass The class to modify. * @param[in] func An allocator function for the class. * @pre `klass` must be an instance of Class. */ void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func); /** * Deletes the allocator function of a class. It is sometimes desirable to * restrict creation of an instance of a class. For example it rarely makes * sense for a DB adaptor class to allow programmers creating DB row objects * without querying the DB itself. You can kill sporadic creation of such * objects then, by nullifying the allocator function using this API. * * @param[out] klass The class to modify. * @pre `klass` must be an instance of Class. */ void rb_undef_alloc_func(VALUE klass); /** * Queries the allocator function of a class. * * @param[in] klass The class in question. * @pre `klass` must be an instance of Class. * @retval 0 No allocator function is registered. * @retval otherwise The allocator function. * * @internal * * Who cares? @shyouhei finds no practical usage of the return value. Maybe we * need KonMari. */ rb_alloc_func_t rb_get_alloc_func(VALUE klass); /** * Clears the inline constant caches associated with a particular ID. Extension * libraries should not bother with such things. Just forget about this API (or * even, the presence of constant caches). */ void rb_clear_constant_cache_for_id(ID id); /** * Resembles `alias`. * * @param[out] klass Where to define an alias. * @param[in] dst New name. * @param[in] src Existing name. * @exception rb_eTypeError `klass` is not a class. * @exception rb_eFrozenError `klass` is frozen. * @exception rb_eNameError No such method named `src`. * @post `klass` has a method named `dst`, which is the identical to its * method named `src`. */ void rb_alias(VALUE klass, ID dst, ID src); /** * This function resembles now-deprecated `Module#attr`. * * @param[out] klass Where to define an attribute. * @param[in] name Name of an instance variable. * @param[in] need_reader Whether attr_reader is needed. * @param[in] need_writer Whether attr_writer is needed. * @param[in] honour_visibility Whether to use the current visibility. * @exception rb_eTypeError `klass` is not a class. * @exception rb_eFrozenError `klass` is frozen. * @post If `need_reader` is set `klass` has a method named `name`. * @post If `need_writer` is set `klass` has a method named `name=`. * * @internal * * The three `int` arguments should have been bool, but there was no such thing * like a bool when K&R was used in this project. */ void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility); RBIMPL_ATTR_NONNULL(()) /** * Removes a method. Don't confuse this to rb_undef_method(), which doesn't * remove a method. This one resembles `Module#remove_method`. * * @param[out] klass The class to remove a method. * @param[in] name Name of a method to be removed. * @exception rb_eTypeError `klass` is a non-module. * @exception rb_eFrozenError `klass` is frozen. * @exception rb_eNameError No such method. * @see rb_undef_method */ void rb_remove_method(VALUE klass, const char *name); /** * Identical to rb_remove_method(), except it accepts the method name as ::ID. * * @param[out] klass The class to remove a method. * @param[in] mid Name of a method to be removed. * @exception rb_eTypeError `klass` is a non-module. * @exception rb_eFrozenError `klass` is frozen. * @exception rb_eNameError No such method. * @see rb_undef */ void rb_remove_method_id(VALUE klass, ID mid); /** * Queries if the klass has this method. This function has only one line of * document in the implementation that states "// deprecated". Don't know what * that means though. * * @param[in] klass The class in question. * @param[in] id The method name to query. * @param[in] ex Undocumented magic value. * @retval false Method not found. * @retval true There is a method. * @pre `klass` must be a module. * * @internal * * @shyouhei has no motivation to describe what should be passed to `ex`. It * seems this function should just be trashed. */ int rb_method_boundp(VALUE klass, ID id, int ex); /** * Well... Let us hesitate from describing what a "basic definition" is. This * nuanced concept should have been kept private. Just please. Don't touch * it. This function is a badly distributed random number generator. Right? * * @param[in] klass The class in question. * @param[in] mid The method name in question. * @retval 1 It is. * @retval 0 It isn't. */ int rb_method_basic_definition_p(VALUE klass, ID mid); /** * Identical to rb_respond_to(), except it additionally takes the visibility * parameter. This does not make difference unless the object has * `respond_to?` undefined, but has `respond_to_missing?` defined. That case * the passed argument becomes the second argument of `respond_to_missing?`. * * @param[in] obj The object in question. * @param[in] mid The method name in question. * @param[in] private_p This is the second argument of `obj`'s * `respond_to_missing?`. * @retval 1 Yes it does. * @retval 0 No it doesn't. */ int rb_obj_respond_to(VALUE obj, ID mid, int private_p); /** * Queries if the object responds to the method. This involves calling the * object's `respond_to?` method. * * @param[in] obj The object in question. * @param[in] mid The method name in question. * @retval 1 Yes it does. * @retval 0 No it doesn't. */ int rb_respond_to(VALUE obj, ID mid); RBIMPL_ATTR_NORETURN() /** * Raises ::rb_eNotImpError. This function is used as an argument to * rb_define_method() etc. * * ```CXX * rb_define_method(rb_cFoo, "foo", rb_f_notimplement, -1); * ``` * * @param argc Unused parameter. * @param argv Unused parameter. * @param obj Unused parameter. * @param marker Unused parameter. * @exception rb_eNotImpError Always. * @return Never returns. * * @internal * * See also the Q&A section of include/ruby/internal/anyargs.h. */ VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker); #if !defined(RUBY_EXPORT) && defined(_WIN32) RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker); #define rb_f_notimplement (*rb_f_notimplement_) #endif /* vm_backtrace.c */ /** * Prints the backtrace out to the standard error. This just confuses people * for no reason. Evil souls must only use it. * * @internal * * Actually it is very useful when called from an interactive GDB session. */ void rb_backtrace(void); /** * Creates the good old fashioned array-of-strings style backtrace info. * * @return An array which contains strings, which are the textual * representations of the backtrace locations of the current thread of * the current ractor of the current execution context. * @note Ruby scripts can access more sophisticated * `Thread::Backtrace::Location`. But it seems there is no way for C * extensions to use that API. */ VALUE rb_make_backtrace(void); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_VM_H */