#ifndef RBIMPL_INTERN_STRUCT_H /*-*-C++-*-vi:se ft=cpp:*/ #define RBIMPL_INTERN_STRUCT_H /** * @file * @author Ruby developers * @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_cStruct. */ #include "ruby/internal/dllexport.h" #include "ruby/internal/intern/vm.h" /* rb_alloc_func_t */ #include "ruby/internal/value.h" RBIMPL_SYMBOL_EXPORT_BEGIN() /* struct.c */ VALUE rb_struct_new(VALUE, ...); VALUE rb_struct_define(const char*, ...); VALUE rb_struct_define_under(VALUE, const char*, ...); VALUE rb_struct_alloc(VALUE, VALUE); VALUE rb_struct_initialize(VALUE, VALUE); VALUE rb_struct_aref(VALUE, VALUE); VALUE rb_struct_aset(VALUE, VALUE, VALUE); VALUE rb_struct_getmember(VALUE, ID); VALUE rb_struct_s_members(VALUE); VALUE rb_struct_members(VALUE); VALUE rb_struct_size(VALUE s); VALUE rb_struct_alloc_noinit(VALUE); VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...); VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...); RBIMPL_SYMBOL_EXPORT_END() #endif /* RBIMPL_INTERN_STRUCT_H */ ='http://www.w3.org/1999/xhtml'>
To fix build failures.
sed -i s/ruby3/rbimpl/g 2020-05-11T00:24:08+00:00 卜部昌平 shyouhei@ruby-lang.org 2020-05-04T07:27:48+00:00 122f96c362c0391045d9b10d81d3681cb2455da5

sed -i s/RUBY3/RBIMPL/g 2020-05-11T00:24:08+00:00 卜部昌平 shyouhei@ruby-lang.org 2020-05-04T06:52:56+00:00 97672f669af53c41b094772559030195787406be Devs do not love "3". The only exception is RUBY3_KEYWORDS in parse.y, which seems unrelated to our interests.
Devs do not love "3".  The only exception is RUBY3_KEYWORDS in parse.y,
which seems unrelated to our interests.
sed -i s|ruby/3|ruby/impl|g 2020-05-11T00:24:08+00:00 卜部昌平 shyouhei@ruby-lang.org 2020-05-04T06:35:26+00:00 d7f4d732c199df24620a162372c71ee83ed21e62 This shall fix compile errors.
This shall fix compile errors.
add #include guard hack 2020-04-13T07:06:00+00:00 卜部昌平 shyouhei@ruby-lang.org 2020-04-10T05:11:40+00:00 4ff3f205408ff8bb413d69151105d301858136ba According to MSVC manual (*1), cl.exe can skip including a header file when that: - contains #pragma once, or - starts with #ifndef, or - starts with #if ! defined. GCC has a similar trick (*2), but it acts more stricter (e. g. there must be _no tokens_ outside of #ifndef...#endif). Sun C lacked #pragma once for a looong time. Oracle Developer Studio 12.5 finally implemented it, but we cannot assume such recent version. This changeset modifies header files so that each of them include strictly one #ifndef...#endif. I believe this is the most portable way to trigger compiler optimizations. [Bug #16770] *1: https://docs.microsoft.com/en-us/cpp/preprocessor/once *2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
According to MSVC manual (*1), cl.exe can skip including a header file
when that:

- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.

GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).

Sun C lacked #pragma once for a looong time.  Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.

This changeset modifies header files so that each of them include
strictly one #ifndef...#endif.  I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]

*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Merge pull request #2991 from shyouhei/ruby.h 2020-04-08T04:28:13+00:00 卜部昌平 shyouhei@ruby-lang.org 2020-04-08T04:28:13+00:00 9e6e39c3512f7a962c44dc3729c98a0f8be90341 Split ruby.h
Split ruby.h