[Fxruby-commits] CVS: FXRuby/ext/fox/include FXRuby.h,1.21,1.21.2.1
Status: Inactive
Brought to you by:
lyle
From: Lyle J. <ly...@us...> - 2002-04-30 01:54:51
|
Update of /cvsroot/fxruby/FXRuby/ext/fox/include In directory usw-pr-cvs1:/tmp/cvs-serv17560 Modified Files: Tag: release10 FXRuby.h Log Message: Fixed the bug in overloaded to_ruby() functions: VALUE to_ruby(FXObject*); VALUE to_ruby(const FXObject*); for the case where the input pointer is NULL. Should return Qnil in those cases. See SF Bug #550417. Index: FXRuby.h =================================================================== RCS file: /cvsroot/fxruby/FXRuby/ext/fox/include/FXRuby.h,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -C2 -d -r1.21 -r1.21.2.1 *** FXRuby.h 3 Apr 2002 21:40:57 -0000 1.21 --- FXRuby.h 30 Apr 2002 01:54:47 -0000 1.21.2.1 *************** *** 176,188 **** inline VALUE to_ruby(FXObject* obj){ ! char type[64]; ! sprintf(type,"%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type); } inline VALUE to_ruby(const FXObject* obj){ ! char type[64]; ! sprintf(type,"%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type); } --- 176,196 ---- inline VALUE to_ruby(FXObject* obj){ ! if(obj){ ! FXString type=FXStringFormat("%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type.text()); ! } ! else{ ! return Qnil; ! } } inline VALUE to_ruby(const FXObject* obj){ ! if(obj){ ! FXString type=FXStringFormat("%s *",obj->getClassName()); ! return FXRbGetRubyObj(obj,type.text()); ! } ! else{ ! return Qnil; ! } } |