Displaying 20 results from an estimated 32 matches for "int2num".
2005 Sep 10
2
Swig generates bad interface to GetTextExtent
Swig''s bad interface generation strikes again. get_text_extent called
with 1 argument maps to WindowDC''s _wrap_wxWindowDC_GetTextExtent__SWIG_0
Since this generates a wxFont that''s not initialized to nil it fails
when calling into wxWindows. Anyone have a suggestion?
2004 Jul 31
3
Bug in new_work_item
Hi all,
Windows 2000
Ruby 1.8.2 R7
VC++ 6.0
I noticed that if I try to call new_work_item and give
the task a name that already exists, I get a segfault:
C:\eclipse\workspace\win32-taskscheduler>ruby test.rb
"0.1.0"
test.rb:22:in `new_work_item'': NewWorkItem() function
failed (Win32::TaskSchedul
erError)
from test.rb:22
test.rb:22: [BUG] Segmentation fault
ruby
2007 Apr 13
0
[961] branches/wxruby2/wxwidgets_282/swig: Move wxDateTime typemap into shared file, map to core Time class instead
...uot;> %}
</span><span class="cx">
</span><ins>+
+
+%typemap(in) wxCalendarDateBorder {
+        $1 = (wxCalendarDateBorder)NUM2INT($input);
+}
+
+%typemap(out) wxCalendarDateBorder {
+ $result = INT2NUM((int)$1);
+}
+
</ins><span class="cx"> %ignore wxCalendarCtrl::wxCalendarCtrl();
</span><span class="cx">
</span><span class="cx"> %import "include/wxObject.h"
</span></span></pre></div>
<a id=&q...
2005 Oct 06
9
Grid.GetTextExtent
Wow. Look what SWIG does to GetTextExtent in Grid.cpp:
void SwigDirector_wxGrid::GetTextExtent(wxString const &string, int *x,
int *y, int *descent, int *externalLeading, wxFont const *font) const {
...
if (swig_get_up()) {
wxWindow::GetTextExtent(string,x,y,descent,externalLeading,font);
return;
}
obj0 = rb_str_new2((const char *)(&string)->mb_str());
2004 Oct 23
0
win32-ipc, with blocks (code review please)
...2UINT(RARRAY(arr)->ptr[i]);
}
dwWait = WaitForMultipleObjects(len,handles,fWaitAll,dwTimeOut);
// Yield block if signalled and block is provided
if((dwWait >= WAIT_OBJECT_0) && (dwWait < WAIT_OBJECT_0 + len)){
if(rb_block_given_p()){
rb_yield(klass);
}
return INT2NUM(dwWait - WAIT_OBJECT_0 + 1); // signalled
}
if((dwWait >= WAIT_ABANDONED_0) && (dwWait < WAIT_ABANDONED_0 + len)){
return INT2NUM(-(dwWait - WAIT_ABANDONED_0 + 1)); // an abandoned
mutex
}
if(dwWait == WAIT_TIMEOUT){
return INT2NUM(0); // Timed out
}...
2007 Jun 26
0
[1084] trunk/wxruby2/swig/classes/SystemSettings.i: Fix missing punctuation in SystemSettings typemaps
...xSystemSettings
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxSystemSettings);
</span><span class="cx">
</span><del>-%typemap(in) wxSystemColour "$1 = (wxSystemColour)NUM2INT($input)";
-%typemap(out) wxSystemColour " $result = INT2NUM((int)$1)";
-%typemap(in) wxSystemFont "$1 = (wxSystemFont)NUM2INT($input)";
-%typemap(out) wxSystemFont "$result = INT2NUM((int)$1)";
-%typemap(in) wxSystemMetric "$1 = (wxSystemMetric)NUM2INT($input)";
-%typemap(out) wxSystemMetric "$result = INT2NUM((int)$1...
2007 Jun 26
0
[1080] trunk/wxruby2/swig: Moved typemaps specific to SystemSetting out of general typemap file
...xSystemSettings
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxSystemSettings);
</span><span class="cx">
</span><ins>+%typemap(in) wxSystemColour "$1 = (wxSystemColour)NUM2INT($input)";
+%typemap(out) wxSystemColour " $result = INT2NUM((int)$1)";
+%typemap(in) wxSystemFont "$1 = (wxSystemFont)NUM2INT($input)";
+%typemap(out) wxSystemFont "$result = INT2NUM((int)$1)";
+%typemap(in) wxSystemMetric "$1 = (wxSystemMetric)NUM2INT($input)";
+%typemap(out) wxSystemMetric "$result = INT2NUM((int)$1...
2006 Apr 14
3
[ win32utils-Bugs-4101 ] create hash param
Bugs item #4101, was opened at 2006-04-14 11:27
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=4101&group_id=85
Category: win32-process
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: create hash param
Initial Comment:
hi,
problem with process, when I do
pid = Process.create(
2006 Nov 24
0
[756] trunk/wxruby2/swig: Moved one-shot typemaps for ListBox.get_selections into ListBox.i
...;/span><ins>+// typemaps for GetSelections()
+%typemap(in,numinputs=0) (wxArrayInt& selections) (wxArrayInt tmp) {
+ $1 = &tmp;
+}
+
+%typemap(out) (wxArrayInt& selections) {
+ $result = rb_ary_new();
+ for (int i = 0; i < $1.GetCount(); i++)
+ {
+ rb_ary_push($result,INT2NUM( $1.Item(i) ) );
+ }
+}
+
+%typemap(argout) (wxArrayInt& selections) {
+ $result = rb_ary_new();
+ for (int i = 0; i < ($1)->GetCount(); i++)
+ {
+ rb_ary_push($result,INT2NUM( ($1)->Item(i) ) );
+ }
+}
+// end typemaps for GetSelections()
+
</ins><span class=&quo...
2007 Jun 25
0
[1072] trunk/wxruby2/swig/shared/datetime.i: Add typemap for DateTime::WeekDay; plug mem leak with wxDateTime arg
...</span><span class="cx">
</span><ins>+%typemap(freearg) wxDateTime& "if ( argc > $argnum - 2 ) delete $1;"
+
</ins><span class="cx"> %typemap(out) wxDateTime& {
</span><span class="cx"> VALUE y = INT2NUM($1->GetYear());
</span><span class="cx"> VALUE mon = INT2NUM($1->GetMonth() + 1);
</span><span class="lines">@@ -29,11 +31,14 @@
</span><span class="cx"> VALUE s = INT2NUM($1->GetSecond());
</span><span clas...
2011 Dec 08
0
[hivex] [PATCH 2/8] generator: Add new return type to ABI: RLenValue
...en"]]
+ | RLenValue -> c_params @ [["&len"]]
| _ -> c_params in
let c_params = List.concat c_params in
@@ -3546,6 +3619,11 @@ get_values (VALUE valuesv, size_t *nr_values)
pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"len\")), INT2NUM (len));\n";
pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"type\")), INT2NUM (t));\n";
pr " return rv;\n"
+ | RLenValue ->
+ pr " VALUE rv = rb_hash_new ();\n";
+ pr " rb_hash_aset (rv, ID2SYM (rb_intern (\&q...
2006 Mar 26
5
[ win32utils-Bugs-3924 ] Segmentation fault under Windows
Bugs item #3924, was opened at 26/03/2006 22:12
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=3924&group_id=85
Category: win32-taskscheduler
Group: Code
Status: Open
Resolution: None
Priority: 3
Submitted By: David FAROI (dfaroi)
Assigned to: Nobody (None)
Summary: Segmentation fault under Windows
Initial Comment:
I''m trying to make
2011 Oct 19
1
[hivex][PATCH 2/8] generator: Add new return type to ABI: RLenValue
...en"]]
+ | RLenValue -> c_params @ [["&len"]]
| _ -> c_params in
let c_params = List.concat c_params in
@@ -3497,6 +3570,11 @@ get_values (VALUE valuesv, size_t *nr_values)
pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"len\")), INT2NUM (len));\n";
pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"type\")), INT2NUM (t));\n";
pr " return rv;\n"
+ | RLenValue ->
+ pr " VALUE rv = rb_hash_new ();\n";
+ pr " rb_hash_aset (rv, ID2SYM (rb_intern (\&q...
2006 Dec 07
0
Fwd: win32-service problems with patch
...code, create a ruby thread to deal with it
- // this might be over engineering the solution, but I don''t
- // want to block Service_Ctrl longer than necessary and the
- // critical section will block it.
- VALUE val = rb_hash_aref(EventHookHash,
INT2NUM(waiting_control_code));
- if(val!=Qnil) {
- VALUE thread = rb_thread_create(Service_Event_Dispatch,
(void*) val);
- rb_funcall(thread_group, cAdd, 1, thread);
+ if (waiting_control_code != SERVICE_CONTROL_STOP) {
+ // if there is a code...
2011 Aug 31
1
[PATCH] hivex: Add byte runs for nodes and values
...pr " return Data_Wrap_Struct (c_hivex, NULL, ruby_hivex_free, r);\n"
+ | RSize
| RNode
| RValue
| RInt64 ->
@@ -3457,6 +3616,14 @@ get_values (VALUE valuesv, size_t *nr_values)
pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"len\")), INT2NUM (len));\n";
pr " rb_hash_aset (rv, ID2SYM (rb_intern (\"type\")), INT2NUM (t));\n";
pr " return rv;\n"
+ | RLenNode ->
+ pr " VALUE rv = rb_hash_new ();\n";
+ pr " rb_hash_aset (rv, ID2SYM (rb_intern (\&qu...
2007 May 21
0
[1024] trunk/wxruby2/swig: Memory mgmt: defs and implementation of new memory management; strip
...eeded and will be managed by WxWidgets.
+void GcNullFreeFunc(void *ptr)
</ins><span class="cx"> {
</span><del>- if (GcRubyHash == Qnil)
- {
- rb_global_variable(&GcRubyHash);
- GcRubyHash = rb_hash_new();
- }
- rb_hash_aset(GcRubyHash, INT2NUM((long)ptr), val);
-}
-
-VALUE GcGetValueFromPtr(void *ptr)
-{
- if (GcRubyHash == Qnil)
- {
- rb_global_variable(&GcRubyHash);
- GcRubyHash = rb_hash_new();
- }
- return rb_hash_aref(GcRubyHash, INT2NUM((long)ptr));
-}
-
-void GcMarkDeleted(void *ptr)
-{
- DeletedHa...
2006 Sep 20
1
typemap.i.patch
This patch implements a more generic solution to the problem that will
work for all our integer types at least. Use this instead of the last
version I sent, please.
Roy
_______________________________________________
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
2006 Dec 24
0
[799] trunk/wxruby2: Fixed TreeItemId == method
...><span class="cx"> %}
</span><span class="cx">
</span><ins>+// returns the underlying opaque identifier as a ruby fixnum
+%extend wxTreeItemId {
+ VALUE to_i()
+ {
+        return INT2NUM( (int)self->m_pItem );
+ }
+}
+
</ins><span class="cx"> %include "include/wxTreeItemId.h"
</span></span></pre>
</div>
</div>
</body>
</html>
2006 Mar 08
5
Ruby/LDAP on Rails
This is wierd. I''m trying to get Ruby/LDAP up and working, and at least
the basics work fine under irb:
irb(main):001:0> require ''ldap''
=> true
irb(main):002:0> LDAP::Conn.new()
=> #<LDAP::Conn:0x1b87ac>
irb(main):003:0>
So far, so good. All LDAP::Conn.new does is call ldap_init with host
and port parameters, which in turn just allocates the