summaryrefslogtreecommitdiffhomepage
path: root/src/debug.c
diff options
context:
space:
mode:
authorcubicdaiya <[email protected]>2014-03-01 03:31:45 +0900
committercubicdaiya <[email protected]>2014-03-01 03:31:45 +0900
commit67de10bfcb9d9ff21e1aa678aff8afa10446b7c4 (patch)
tree440782e0ae519f5d0f82a8e68b76274aa0bd84a3 /src/debug.c
parent9b65a0d5722c4f23a9b3390e4d9e4277a4881dea (diff)
downloadmruby-67de10bfcb9d9ff21e1aa678aff8afa10446b7c4.tar.gz
mruby-67de10bfcb9d9ff21e1aa678aff8afa10446b7c4.zip
use C style comments instead of C++ style comments
According to CONTRIBUTING.md, Don't use C++ style comments /* This is the prefered comment style */ Use C++ style comments only for temporary comment e.g. commenting out some code lines.
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/debug.c b/src/debug.c
index 075af5c24..27c1c6f78 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -10,7 +10,7 @@ get_file(mrb_irep_debug_info *info, uint32_t pc)
int32_t count;
if(pc >= info->pc_count) { return NULL; }
- // get upper bound
+ /* get upper bound */
ret = info->files;
count = info->flen;
while (count > 0) {
@@ -24,9 +24,9 @@ get_file(mrb_irep_debug_info *info, uint32_t pc)
--ret;
- // check returning file exists inside debug info
+ /* check returning file exists inside debug info */
mrb_assert(info->files <= ret && ret < (info->files + info->flen));
- // check pc is within the range of returning file
+ /* check pc is within the range of returning file */
mrb_assert((*ret)->start_pos <= pc &&
pc < (((ret + 1 - info->files) < info->flen)
? (*(ret+1))->start_pos : info->pc_count));
@@ -77,7 +77,7 @@ mrb_debug_get_line(mrb_irep *irep, uint32_t pc)
return f->line_ary[pc - f->start_pos];
case mrb_debug_line_flat_map: {
- // get upper bound
+ /* get upper bound */
mrb_irep_debug_info_line *ret = f->line_flat_map;
uint32_t count = f->line_entry_count;
while (count > 0) {
@@ -91,9 +91,9 @@ mrb_debug_get_line(mrb_irep *irep, uint32_t pc)
--ret;
- // check line entry pointer range
+ /* check line entry pointer range */
mrb_assert(f->line_flat_map <= ret && ret < (f->line_flat_map + f->line_entry_count));
- // check pc range
+ /* check pc range */
mrb_assert(ret->start_pos <= pc &&
pc < (((ret + 1 - f->line_flat_map) < f->line_entry_count)
? (ret+1)->start_pos : irep->debug_info->pc_count));
@@ -185,7 +185,7 @@ mrb_debug_info_append_file(mrb_state *mrb, mrb_irep *irep,
m.line = irep->lines[start_pos + i];
ret->line_flat_map[ret->line_entry_count] = m;
- // update
+ /* update */
++ret->line_entry_count;
prev_line = irep->lines[start_pos + i];
}