Remove 2 restrictions from `CONTRIBUTING.md`; close #5159

* Allow mixed declarations, especially loop variables
* Allow C++ style commends `//`
parent 55e12757
...@@ -33,11 +33,6 @@ mruby should be highly portable to other systems and compilers. For this it is ...@@ -33,11 +33,6 @@ mruby should be highly portable to other systems and compilers. For this it is
recommended to keep your code as close as possible to the C99 standard recommended to keep your code as close as possible to the C99 standard
(http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf). (http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf).
Although we target C99, we've heard some compilers in the embedded environment
still requires declarations of local variables to be at the beginning of a
scope. Until we confirm the situation has changed, we use the old-style
variable declaration.
Visual C++ is also an important target for mruby (supported version is 2013 or Visual C++ is also an important target for mruby (supported version is 2013 or
later). For this reason features that are not supported by Visual C++ may not later). For this reason features that are not supported by Visual C++ may not
be used (e.g. `%z` of `strftime()`). be used (e.g. `%z` of `strftime()`).
...@@ -50,12 +45,6 @@ The dependencies to libraries should be kept to an absolute minimum. This ...@@ -50,12 +45,6 @@ The dependencies to libraries should be kept to an absolute minimum. This
increases the portability but makes it also easier to cut away parts of mruby increases the portability but makes it also easier to cut away parts of mruby
on-demand. on-demand.
#### Don't use C++ style comments
/* This is the preferred comment style */
Use C++ style comments only for temporary comment e.g. commenting out some code lines.
#### Insert a break after the function return value: #### Insert a break after the function return value:
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment