search for: rb_define_method

Displaying 20 results from an estimated 21 matches for "rb_define_method".

2007 May 29
0
[1035] trunk/wxruby2/swig/classes/EvtHandler.i: Removed a heap of redundant stuff that''s been #if 0''d for a while
...h_id(argc, argv, self, wxEVT_MENU_HIGHLIGHT); -} - -static VALUE evt_menu_highlight_all(int argc, VALUE *argv, VALUE self) -{ - return internal_evt_no_parameters(argc, argv, self, wxEVT_MENU_HIGHLIGHT_ALL); -} - - -// TODO: Add for ListEvent types? Is this needed? - -%} - - - - -%init %{ - rb_define_method(cWxEvtHandler.klass, "connect", VALUEFUNC(connect_fnc), -1); - rb_define_method(cWxEvtHandler.klass, "evt_menu", VALUEFUNC(evt_menu), -1); - rb_define_method(cWxEvtHandler.klass, "evt_tool", VALUEFUNC(evt_menu), -1); - rb_define_method(cWxEvtHandler.klass, &qu...
2006 Jul 25
6
Wizards
Hi Please find attached a set of patches and swig files to implement Wizards for wxruby. Also a brief sample. Quick q - the C declarations of evt_xxx_xxx methods and their attaching to Ruby classes seems to be duplicated across Events.i and EvtHandler.i - is one of these the right place to be adding them? or both? Thanks alex _______________________________________________
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
2013 May 16
1
support remotely mounting disk images in p2v
Figure I'd share the latest revision to p2v I had regarding $subject. The patch now applies against HEAD and compiles fine. I was able to update the package on the client and run virt-p2v, though have yet to do a full end-to-end verification Most likely a little more work is needed to tidy up some edge cases and fully flush things out, but the majority of the work should be in place. On the
2005 Aug 10
5
more patches
Here are a few patches 2 small changes and one a little hefty. All are to *.i files. SpinCtrl.patch - Changes cWxSpinCtrl.klass to mWxSpinCtrl in rb_define_method. Dialog.patch - Removed the %ignore wxDialog::wxDialog line, this line prevents Dialogs working with XRC. Window.i - Added special code for find_window_* methods so the correct object type is returned, this is very important when working with XRC and you want to get an object by id, name or label...
2004 Oct 23
0
win32-ipc, with blocks (code review please)
...efine_class_under(mWin32,"IpcError",rb_eStandardError); // IPC class and instance methods rb_define_alloc_func(cIpc,ipc_allocate); rb_define_singleton_method(cIpc,"wait_any",ipc_wait_any,-1); rb_define_singleton_method(cIpc,"wait_all",ipc_wait_all,-1); rb_define_method(cIpc,"initialize",ipc_init,1); rb_define_method(cIpc,"wait",ipc_wait,-1); // Constants rb_define_const(cIpc,"INFINITE",UINT2NUM(INFINITE)); rb_define_const(cIpc,"VERSION",rb_str_new2(WIN32_IPC_VERSION)); }
2003 Nov 13
7
modified classes
-- +-[ Kontra, Gergely<kgergely@mcl.hu> PhD student Room IB113 ]---------+ | http://www.mcl.hu/~kgergely "Olyan langesz vagyok, hogy | | Mobil:(+36 20) 356 9656 ICQ: 175564914 poroltoval kellene jarnom" | +-- Magyar php mirror es magyar php dokumentacio: http://hu.php.net --+ -------------- next part -------------- A non-text attachment was scrubbed... Name:
2006 Aug 15
5
Ferret Segmentation Faults
Hi, I am getting a number of segmentation faults using Ferret 0.9.5, Fedora Core 5 and Ruby 1.8.4 I installed it with the recommended gem install ferret and example segmentation fault creation line would be as follows: @records = FerretConfig::INDEX.search("address_line_2:\"Dumbarton\"") I am also using acts_as_ferret and rails 1.15 but think this is an issue with
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
..._FUNC_T #define rb_alloc_func_t void* #endif - rb_define_alloc_func (c_guestfs, (rb_alloc_func_t) ruby_guestfs_create); + rb_define_alloc_func (c_guestfs, (rb_alloc_func_t) ruby_guestfs_alloc); #endif - rb_define_module_function (m_guestfs, \"create\", ruby_guestfs_create, -1); + rb_define_method (c_guestfs, \"initialize\", ruby_guestfs_initialize, -1); rb_define_method (c_guestfs, \"close\", ruby_guestfs_close, 0); rb_define_method (c_guestfs, \"set_event_callback\", ruby_set_event_callback, 2); @@ -719,6 +772,11 @@ Init__guestfs (vo...
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
2006 Jan 16
0
PGconn class doesn''t recognize all the function export from postgres.so
...which interited the old postgres adapter and I try to use the PGconn class, But I find out I can''t access to some of the exported functions in postgres.so (I''m using LINUX) In fact, only the methode export with rb_define_singleton_method can be used, only function s exported with rb_define_method, the PGconn ruby class doesn''t recognise it as the function. when I export all the methods name of PGconn class, I can only see the methods exported with rb_define_singleton_method. Can someone know why???? Thanks you very much Saiho __________________________________________________...
2005 Aug 04
2
Next swig problem
...ave class/struct/union type src/SpinCtrl.cpp(1147) : error C2371: ''cWxSpinCtrl'' : redefinition; different basic types ... The reason for this is the way it trying to use something before declaring it: extern "C" void PostInit_wxSpinCtrl(void) { #ifndef __WXGTK__ rb_define_method(cWxSpinCtrl.klass, "set_selection", VALUEFUNC(_wrap_wxSpinCtrl_SetSelection), -1); #endif } extern swig_class cWxControl; swig_class cWxSpinCtrl; If I move the PostInit part down below the declaration all works fine (compilation wise).
2004 Nov 07
2
Problems with DeviceIoControl()
...} rv = DeviceIoControl( h, FSCTL_SET_COMPRESSION, (LPVOID)inBuf, sizeof(inBuf), NULL, 0, &dwBytesReturned, NULL ); if(!rv){ rb_raise(cFileError,ErrorDescription(GetLastError())); } return self; } // Inside Init_file() rb_define_method(rb_cFile,"compressed=",file_set_compressed,1); # Sample program f = File.open("temp.txt") f.compressed = true f.close But, I''m still getting "access denied" or "invalid access to memory location", depending on the open mode flag I use. Testing ind...
2005 May 02
3
where is destructors?
...o destructors of wrapped wxwidgets objects in wxruby? Is there some problems? This is a patch: ================================================================ --- src/bitmap.cpp 30 Nov 2003 22:54:48 -0000 1.2 +++ src/bitmap.cpp 2 May 2005 11:11:58 -0000 @@ -32,10 +32,16 @@ rb_define_method(rubyClass, "convert_to_image", VALUEFUNC(WxBitmap::ConvertToImage), 0); } +void WxBitmap_free(wxBitmap *bmp) { + if(bmp) { + delete bmp; + }; +}; + VALUE WxBitmap::alloc(VALUE self) { - return Data_Wrap_Struct(self, 0, 0, 0); + return Data_Wrap_Struct(self, 0, WxB...
2005 Aug 11
2
Patch file for FileDialog.i
Attached is a patch file for FileDialog.i. It doesn''t work 100% yet because I haven''t yet figured out how to make it put the ruby declarations in the right place. If I cut and paste the rb_define_methods into the right place this works perfectly. This patch fixes the dialogs.rb multiple select example so that get_paths and get_filenames returns a ruby array. Note that I may have broken subclassing with this as I think there were _wrap_ wrappers that got lost. Perhaps Kevin or Sean can point...
2003 Aug 24
2
wxRuby 0.1.0 Alpha has been released!
http://rubyforge.org/project/showfiles.php?group_id=35&release_id=46 The code itself has been quite stable for several weeks. This release includes Gour''s excellent MinGW README notes, along with various updates to the README, and clarification of the LICENSE. Thanks to everyone for your help in putting this together. It was definitely a team project. I look forward to getting lots
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...t.iter ( @@ -674,7 +673,7 @@ ruby_user_cancel (VALUE gv) pr "}\n"; pr "\n" - ) all_functions; + ) external_functions; pr "\ extern void Init__guestfs (void); /* keep GCC warnings happy */ @@ -727,7 +726,7 @@ Init__guestfs (void) pr " rb_define_method (c_guestfs, \"%s\",\n" alias; pr " ruby_guestfs_%s, %d);\n" name nr_args ) non_c_aliases - ) all_functions; + ) external_functions; pr "}\n" diff --git a/generator/types.ml b/generator/types.ml index 26bf746..c809d2b 100644 --- a/...
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...estfs (void) (* Methods. *) List.iter ( - fun { name = name; style = _, args, optargs; - non_c_aliases = non_c_aliases } -> + fun { name; style = _, args, optargs; non_c_aliases } -> let nr_args = if optargs = [] then List.length args else -1 in pr " rb_define_method (c_guestfs, \"%s\",\n" name; pr " guestfs_int_ruby_%s, %d);\n" name nr_args; diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml index b1681cd09..eafae3368 100644 --- a/generator/tests_c_api.ml +++ b/generator/tests_c_api.ml @@ -69,7 +...
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.