search for: rb_iv_get

Displaying 14 results from an estimated 14 matches for "rb_iv_get".

2006 Dec 23
0
[794] trunk/wxruby2: Fix get_ruby_object so it works with SWIG tracking, move find_window_xx
...;> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return Qnil; </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp r_class = rb_iv_get(mWxruby2, class_name.mb_str() + 2); </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp} </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -&nbsp&nbsp&nbsp&nbsp&nbs...
2006 Dec 20
0
[789] trunk/wxruby2/swig/classes/Window.i: Make GetChildren work (tho general fix for get_ruby_object still needed)
...><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp{ </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE ruby_class = rb_iv_get(mWxruby2, classNameString.mb_str()+2); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspreturnVal = Data_Wrap_Struct(ruby_class,0,0,obj); </del><ins>+&nbsp&nbsp&nbsp&nbsp&...
2007 Jul 21
0
[1136] trunk/wxruby2/swig/classes/App.i: Note when the Wx::App is exiting and avoid doing GC if in process of
...sp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_obj_is_kind_of(rb_obj, cWxWindow.klass) && </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_iv_get(rb_obj, "@__wx_destroyed__") != Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ! rb_ivar_defined(rb_obj, rb_intern("@__wx_destroyed__") ) ) </ins&...
2008 Nov 10
4
PathFindExtension and wide strings
Hi, What''s happening here? require ''windows/path'' require ''windows/unicode'' include Windows::Path include Windows::Unicode file_a = ''bar.txt'' file_w = multi_to_wide(file_a) p PathFindExtensionA(file_a) # ''.txt'' => OK p PathFindExtensionW(file_w) # ''.'' => WRONG Is Ruby chopping the
2007 Apr 13
0
[961] branches/wxruby2/wxwidgets_282/swig: Move wxDateTime typemap into shared file, map to core Time class instead
...ime& { + VALUE y = INT2NUM($1->GetYear()); + VALUE mon = INT2NUM($1->GetMonth() + 1); + VALUE d = INT2NUM($1->GetDay()); + VALUE h = INT2NUM($1->GetHour()); + VALUE min = INT2NUM($1->GetMinute()); + VALUE s = INT2NUM($1->GetSecond()); + + VALUE cTime = rb_iv_get(rb_cObject, "Time"); + // $result = rb_funcall(cDateTime, rb_intern("new"), 6, y, mon, d, h, min, s); + $result = rb_funcall(cTime, rb_intern("local"), 6, y, mon, d, h, min, s); +} + +// Need to have this to over-ride the default which does not work +%typemap(typ...
2007 Jul 21
0
[1137] trunk/wxruby2/swig/classes/TreeCtrl.i: Call correct shared function to check whether TreeCtrl is deleted in markfunc
...void mark_wxTreeCtrl(void *ptr) </span><span class="cx"> { </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( GC_IsWindowDeleted(ptr) ) </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp r...
2007 Jul 20
0
[1125] trunk/wxruby2/swig/shared/control_with_items.i: Avoid MSW crashes when unexpected object is returned by SWIG tracking
...24,8 +26,12 @@ </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspfflush(stdout); -&...
2007 May 21
0
[1026] trunk/wxruby2/swig/shared/control_with_items.i: Memory mgmt: USe __wx_destroyed__ instead of __swig_dead__; fix some
...WIG_RubyInstanceFor(ptr); </span><del>-&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_ivar_get(rb_obj, rb_intern("@__swig_dead__") ) == Qtrue ) </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspf...
2007 Jul 21
0
[1133] trunk/wxruby2/swig/shared/control_with_items.i: Move mark func for ControlWithItems into shared file so changes affect
...Checks whether the C++ object is still around first... - static void mark_wxControlWithItems(void* ptr) { -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyInstanceFor(ptr); -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_iv_get(rb_obj, "@__wx_destroyed__" ) == Qtrue ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; - -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp// On Windows, sometimes the wrong object is associated with the -&nbsp&nbsp&n...
2007 May 22
0
[1029] trunk/wxruby2/swig/classes/MenuBar.i: Add special GC protection for Wx::Menu to prevent premature destruction
...omatically protected in the mark +// phase by Wx::App. However, the ruby object still must not be +// destroyed while the Menu is still accessible on screen, because it +// may be required to handle events. +%{ +void mark_wxMenuBar(void *ptr) +{ + VALUE rb_win = SWIG_RubyInstanceFor(ptr); + if ( rb_iv_get(rb_win, "@__wx_destroyed__") == Qtrue ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; </ins><span class="cx"> </span><ins>+ wxMenuBar* menu_bar = (wxMenuBar*)ptr; + // Mark each menu in the menubar in turn + for (...
2007 Jun 25
0
[1072] trunk/wxruby2/swig/shared/datetime.i: Add typemap for DateTime::WeekDay; plug mem leak with wxDateTime arg
...$1->GetMonth() + 1); </span><span class="lines">@@ -29,11 +31,14 @@ </span><span class="cx"> VALUE s = INT2NUM($1->GetSecond()); </span><span class="cx"> </span><span class="cx"> VALUE cTime = rb_iv_get(rb_cObject, "Time"); </span><del>- // $result = rb_funcall(cDateTime, rb_intern("new"), 6, y, mon, d, h, min, s); </del><ins>+ </ins><span class="cx"> $result = rb_funcall(cTime, rb_intern("local"), 6, y, mon, d, h,...
2007 May 22
0
[1028] trunk/wxruby2/swig/classes/App.i: Fix some GC-mark crashes when SWIG trackings return an unexpected object
...amp;nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_obj_is_kind_of(rb_obj, cWxWindow.klass) && </ins><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_iv_get(rb_obj, "@__wx_destroyed__") != Qtrue ) </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp { </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nb...
2007 May 21
0
[1022] trunk/wxruby2/swig/classes/App.i: Memory mgmt: use Wx::App to mark still-alive Windows, set up Wx::THE_APP const
...eleted by WxWidgets. +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspif ( rb_obj_is_kind_of(rb_obj, cWxWindow.klass) && +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp rb_iv_get(rb_obj, "@__wx_destroyed__") != Qtrue ) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsprb_gc_mark(rb_obj); +&n...
2007 Jul 05
0
[1109] trunk/wxruby2/swig: Move marking of MenuBar from direct %markfunc to via mark_wxFrame, so
...omatically protected in the mark -// phase by Wx::App. However, the ruby object still must not be -// destroyed while the Menu is still accessible on screen, because it -// may be required to handle events. -%{ -void mark_wxMenuBar(void *ptr) -{ - VALUE rb_win = SWIG_RubyInstanceFor(ptr); - if ( rb_iv_get(rb_win, "@__wx_destroyed__") == Qtrue ) -&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return; - - wxMenuBar* menu_bar = (wxMenuBar*)ptr; - // Mark each menu in the menubar in turn - for ( int i = 0; i < menu_bar->GetMenuCount(); i++ ) -&nbsp&n...