Skip to content

Commit d153f3d

Browse files
Charlie Savagedenofevil
authored andcommitted
Fix compilation issues for VC 2010. Note there is still a link issue as described at http://redmine.ruby-lang.org/issues/5193.
1 parent 2e9ed8e commit d153f3d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

ext/ruby_debug/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
hdrs = proc {
55
have_struct_member("rb_method_entry_t", "body", "method.h")
6-
have_header("vm_core.h") and have_header("iseq.h") and have_header("insns.inc") and
6+
have_header("vm_core.h") and have_header("iseq.h", "vm_core.h") and have_header("insns.inc") and
77
have_header("insns_info.inc") and have_header("eval_intern.h")
88
}
99

ext/ruby_debug/ruby_debug.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020

2121
#define STACK_SIZE_INCREMENT 128
2222

23-
RUBY_EXTERN int rb_vm_get_sourceline(const rb_control_frame_t *cfp); /* from vm.c */
23+
int rb_vm_get_sourceline(const rb_control_frame_t *cfp); /* from vm.c */
2424
/* from iseq.c */
2525
#ifdef RB_ISEQ_COMPILE_6ARGS
26-
RUBY_EXTERN VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
26+
VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
2727
#else
28-
RUBY_EXTERN VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE line, VALUE opt);
28+
VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE line, VALUE opt);
2929
#endif
3030

3131
typedef struct {
@@ -861,6 +861,7 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl
861861
{
862862
rb_control_frame_t *cfp = top_frame->info.runtime.cfp;
863863
VALUE hit_count;
864+
int c_hit_count;
864865
rb_iseq_t *iseq = cfp->iseq;
865866

866867
if (iseq != NULL) {
@@ -870,7 +871,7 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl
870871
}
871872

872873
/* send catchpoint notification */
873-
int c_hit_count = FIX2INT(rb_hash_aref(rdebug_catchpoints, debug_context->catch_table.mod_name)) + 1;
874+
c_hit_count = FIX2INT(rb_hash_aref(rdebug_catchpoints, debug_context->catch_table.mod_name)) + 1;
874875
hit_count = INT2FIX(c_hit_count);
875876
rb_hash_aset(rdebug_catchpoints, debug_context->catch_table.mod_name, hit_count);
876877
debug_context->stop_reason = CTX_STOP_CATCHPOINT;
@@ -999,17 +1000,17 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl
9991000
}
10001001
case RUBY_EVENT_RAISE:
10011002
{
1003+
VALUE ancestors;
1004+
VALUE expn_class, aclass;
1005+
int i;
1006+
10021007
if (CTX_FL_TEST(debug_context, CTX_FL_CATCHING)) {
10031008
/* we're re-raising exception after processing line event,
10041009
now allow the next exception to be caught, don't setup catchers */
10051010
CTX_FL_UNSET(debug_context, CTX_FL_CATCHING);
10061011
break;
10071012
}
10081013

1009-
VALUE ancestors;
1010-
VALUE expn_class, aclass;
1011-
int i;
1012-
10131014
if(debug == Qtrue) {
10141015
fprintf(stderr, "stack_size %d\n", debug_context->stack_size);
10151016
for (i = 0; i < debug_context->stack_size; i++) {

0 commit comments

Comments
 (0)