Skip to content

Commit

Permalink
spaces in comments [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
shyouhei committed May 11, 2020
1 parent 122f96c commit 0d88fe3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions include/ruby/impl/attr/noalias.h
Expand Up @@ -22,28 +22,28 @@
*
* ### Q&A ###
*
* - Q: There are seemingly similar attributes named #RBIMPL_ATTR_CONST,
* - Q: There are seemingly similar attributes named #RBIMPL_ATTR_CONST,
* #RBIMPL_ATTR_PURE, and #RBIMPL_ATTR_NOALIAS. What are the difference?
*
* - A: Allowed operations are different.
*
* - #RBIMPL_ATTR_CONST ... Functions attributed by this are not allowed to
* - #RBIMPL_ATTR_CONST ... Functions attributed by this are not allowed to
* read/write _any_ pointers at all (there are exceptional situations
* when reading a pointer is possible but forget that; they are too
* exceptional to be useful). Just remember that everything pointer-
* related are NG.
*
* - #RBIMPL_ATTR_PURE ... Functions attributed by this can read any
* - #RBIMPL_ATTR_PURE ... Functions attributed by this can read any
* nonvolatile pointers, but no writes are allowed at all. The ability
* to read _any_ nonvolatile pointers makes it possible to mark ::VALUE-
* taking functions as being pure, as long as they are read-only.
*
* - #RBIMPL_ATTR_NOALIAS ... Can both read/write, but only through pointers
* passed to the function as parameters. This is a typical situation
* when you create a C++ non-static member function which only concerns
* `this`. No global variables are allowed to read/write. So this is
* not a super-set of being pure. If you want to read something, that
* has to be passed to the function as a pointer. ::VALUE -taking
* - #RBIMPL_ATTR_NOALIAS ... Can both read/write, but only through
* pointers passed to the function as parameters. This is a typical
* situation when you create a C++ non-static member function which only
* concerns `this`. No global variables are allowed to read/write. So
* this is not a super-set of being pure. If you want to read something,
* that has to be passed to the function as a pointer. ::VALUE -taking
* functions thus cannot be attributed as such.
*/
#include "ruby/impl/has/declspec_attribute.h"
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/impl/attr/restrict.h
Expand Up @@ -25,7 +25,7 @@
#include "ruby/impl/token_paste.h"

/* :FIXME: config.h includes conflicting `#define restrict`. MSVC can be
* detected using `RBIMPL_COMPILER_SINCE()`, but Clang & family cannot use
* detected using `RBIMPL_COMPILER_SINCE()`, but Clang & family cannot use
* `__has_declspec_attribute()` which involves macro substitution. */

/** Wraps (or simulates) `__declspec(restrict)` */
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/impl/special_consts.h
Expand Up @@ -102,7 +102,7 @@ RBIMPL_ATTR_CONST()
RBIMPL_ATTR_CONSTEXPR(CXX11)
RBIMPL_ATTR_ARTIFICIAL()
/*
* :NOTE: rbimpl_test HAS to be `__attribute__((const))` in order for clang to
* :NOTE: rbimpl_test HAS to be `__attribute__((const))` in order for clang to
* properly deduce `__builtin_assume()`.
*/
static inline bool
Expand Down
2 changes: 1 addition & 1 deletion include/ruby/impl/stdalign.h
Expand Up @@ -75,7 +75,7 @@
#endif

/**
* Wraps (or simulates) `alignof`. Unlike #RBIMPL_ALIGNAS, we can safely say
* Wraps (or simulates) `alignof`. Unlike #RBIMPL_ALIGNAS, we can safely say
* both C/C++ definitions are effective.
*/
#if defined(__cplusplus) && RBIMPL_HAS_EXTENSION(cxx_alignof)
Expand Down

0 comments on commit 0d88fe3

Please sign in to comment.