search for: rb_ary_entry

Displaying 18 results from an estimated 18 matches for "rb_ary_entry".

2011 Aug 25
4
[PATCH 0/3] ruby: Fix event handler failure
I won't pretend I really understand what's going on here. I've CC'd this message to Chris since he might have a better idea. https://bugzilla.redhat.com/show_bug.cgi?id=733297 In this bug, it appears that the event log callback goes out of scope and is garbage collected. (This is despite the fact we registered it as a global root). When we invoke the callback later,
2006 Aug 24
4
typemap.i patch
This patch adds %directorout typemaps for the GetTextExtent functions _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
2006 Sep 20
3
Fix for non-centered windows
Two patches here: First one removes virtual from a function that shouldn''t have been virtual. Second one applies a typemap to catch GetRectFromChildWindow. For reasons that are completely beyond me the standard ruby OUTPUT typemaps don''t define directorargouts. I will take a stab at patching SWIG''s default typemaps someday so we get this fixed for free on all our
2007 Jan 23
0
[853] trunk/wxruby2/swig: Replace deprecated STR2CSTR with StringValuePtr
...t;<span class="cx"> arr = new wxString[RARRAY($input)->len]; </span><span class="cx"> for (int i = 0; i < RARRAY($input)->len; i++) </span><span class="cx"> { </span><del>- arr[i] = wxString(STR2CSTR(rb_ary_entry($input,i)), wxConvUTF8); </del><ins>+&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUE str = rb_ary_entry($input,i); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp arr[i] = wxString(StringValuePtr(str), wxConvUTF8); </ins>&...
2011 Jan 05
0
Fwd: Review of libguestfs ruby bindings
...#39;t be called anyway). 7) In ruby_guestfs_test0() and other places, there is code like: Check_Type (strlistv, T_ARRAY); { size_t i, len; len = RARRAY_LEN (strlistv); strlist = guestfs_safe_malloc (g, sizeof (char *) * (len+1)); for (i = 0; i < len; ++i) { VALUE v = rb_ary_entry (strlistv, i); strlist[i] = StringValueCStr (v); } strlist[len] = NULL; } Unfortunately this can cause a memory leak. I have an upcoming blog post about this, but the short of it is that anything allocated with malloc() and friends do not take part in ruby garbage collecting. So...
2005 Jul 24
2
Fwd: fix Choice.cpp unicode string
...hows the strings in the choice box. One of the few places that missed UTF8 convertion. --- swig/classes/Choice.i 31 Jan 2005 04:18:52 -0000 1.2 +++ swig/classes/Choice.i 24 Jul 2005 19:18:55 -0000 @@ -14,7 +14,7 @@ for(int i=0; i < $1; ++i) { VALUE thisItem = rb_ary_entry($input, i); - $2[i] = (wxChar *)STR2CSTR(thisItem); + $2[i] = wxConvUTF8.cMB2WC(STR2CSTR(thisItem)); } } There''s another I think UTF8 problem: The onAbout dialog in caret.rb uses the (c) character so the string is not shown. Jani
2007 May 22
0
[1028] trunk/wxruby2/swig/classes/App.i: Fix some GC-mark crashes when SWIG trackings return an unexpected object
...&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp2007-05-22 08:09:51 UTC (rev 1028) </span><span class="lines">@@ -72,9 +72,12 @@ </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspkey = rb_ary_entry(pair, 0); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspval = rb_ary_entry(pair, 1); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_Ru...
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
...quot;cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE key, val; </span><span class="lines">@@ -77,13 +76,12 @@ </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspkey = rb_ary_entry(pair, 0); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspval = rb_ary_entry(pair, 1); </span><span class="cx"> &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_Ru...
2008 Jan 11
9
[ wxruby-Bugs-17013 ] Notebook#get_current_page
Bugs item #17013, was opened at 2008-01-11 06:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=218&aid=17013&group_id=35 Category: Missing API call Group: None Status: Open Resolution: None Priority: 3 Submitted By: Daniel Brumbaugh Keeney (db-keen) Assigned to: Nobody (None) Summary: Notebook#get_current_page Initial Comment: Notebook#get_current_page
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
...p&nbsp&nbsp&nbsp&nbspevent.Skip(); + } + + + static VALUE mark_iterate(VALUE pair, VALUE arg, VALUE self) + { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE key, val; + +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspkey = rb_ary_entry(pair, 0); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspval = rb_ary_entry(pair, 1); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspVALUE rb_obj = SWIG_RubyReferenceToObject(val); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&a...
2006 Apr 27
5
Major Breakthrough?
Attached are patches to make the textctrl.rb sample work fully. Note the new %directorargout typemap I added to fix wxWindows calling into SWIG. I don''t know if this can fix all such problems or not. Let me know what you think. I also rubified the sample a little bit more. Also, note that I fix the << operator so the function can be called. I hope I did this right. Roy
2007 Jan 08
0
[846] trunk/wxruby2/swig/classes/MultiChoiceDialog.i: Fixed - don''t use Ruby 1.9-style API calls cos this breaks older SWIGs
...t;cx"> { </span><del>- for (int i = 0; i < RARRAY_LEN($input); i++) </del><ins>+ for (int i = 0; i < RARRAY($input)->len; i++) </ins><span class="cx"> { </span><span class="cx"> int item = NUM2INT(rb_ary_entry($input,i)); </span><span class="cx"> tmp.Add(item); </span></span></pre> </div> </div> </body> </html>
2007 Jan 08
0
[845] trunk/wxruby2/swig/classes: Added MultiChoiceDialog in class form
...the standard +// typemap(out) ArrayInt in typemap.i +%typemap(in) const wxArrayInt& selections (wxArrayInt tmp){ + if (($input == Qnil) || (TYPE($input) != T_ARRAY)) + { + $1 = &tmp; + } + else + { + for (int i = 0; i < RARRAY_LEN($input); i++) + { + int item = NUM2INT(rb_ary_entry($input,i)); + tmp.Add(item); + } + $1 = &tmp; + } +} + +%import "include/wxObject.h" +%import "include/wxWindow.h" +%import "include/wxEvtHandler.h" +%import "include/wxDialog.h" + +%include "include/wxMultiChoiceDialog.h" </ins&g...
2006 Dec 31
0
[816] trunk/wxruby2: Added AcceleratorTable and AcceleratorTable classes, plus documentation
...{ + $1 = 0; + $2 = NULL; + } + else + { + wxAcceleratorEntry *wx_acc_ent; + arr = new wxAcceleratorEntry[RARRAY($input)->len]; + for (int i = 0; i < RARRAY($input)->len; i++) + { +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SWIG_ConvertPtr(rb_ary_entry($input,i), (void **) &wx_acc_ent, SWIGTYPE_p_wxAcceleratorEntry, 1); +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if (wx_acc_ent == NULL) +&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbs...
2007 May 06
28
mongrel becoming unresponsive
Hello, I''m running mongrel behind apache via proxypass. Every now and then, a spammer tries to proxy traffic through apache, and for some reason, apache forwards the request to mongrel, even though it''s not a site being hosted by me. At times this seems to cause mongrel to become unresponsive, and all requests to the site then fail with a proxy error until mongrel is
2010 Aug 25
18
Puppet hangs
Hello, we have one puppet server managing approx servers, all FreeBSD. The problem is that the puppet clients all hangs, one by one, eventually. They will run for anything between an hour up to a week. But eventually the all hang. We really like puppet and want to keep using it. But the way it is now is completely unusable. We''ve tried many versions, from 24.x, and now 2.6.1rc1. But
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...r " {\n"; - pr " int i, len;\n"; - pr " len = RARRAY_LEN (%sv);\n" n; - pr " %s = guestfs_safe_malloc (g, sizeof (char *) * (len+1));\n" - n; - pr " for (i = 0; i < len; ++i) {\n"; - pr " VALUE v = rb_ary_entry (%sv, i);\n" n; - pr " %s[i] = StringValueCStr (v);\n" n; - pr " }\n"; - pr " %s[len] = NULL;\n" n; - pr " }\n"; - | Bool n -> - pr " int %s = RTEST (%sv);\n" n n - | Int n -> - pr " int %s = NUM...