mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	merges r28836 from trunk into ruby_1_9_2.
-- * ruby.c (ruby_init_loadpath_safe): rb_str_set_len modifies ptr since r26303. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
		
							parent
							
								
									28b376e76b
								
							
						
					
					
						commit
						117a7c052b
					
				
					 2 changed files with 9 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,8 @@
 | 
			
		|||
Mon Aug  2 21:51:16 2010  Nobuyoshi Nakada  <nobu@ruby-lang.org>
 | 
			
		||||
 | 
			
		||||
	* ruby.c (ruby_init_loadpath_safe): rb_str_set_len modifies ptr
 | 
			
		||||
	  since r26303.
 | 
			
		||||
 | 
			
		||||
Mon Aug  2 21:16:03 2010  Masaki Suketa <masaki.suketa@nifty.ne.jp>
 | 
			
		||||
 | 
			
		||||
	* ext/win32ole/win32ole.c: NONAMELESSUNION defined only if gcc
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								ruby.c
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								ruby.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -419,13 +419,15 @@ ruby_init_loadpath_safe(int safe_level)
 | 
			
		|||
	strlcpy(libpath, ".", sizeof(libpath));
 | 
			
		||||
	p = libpath + 1;
 | 
			
		||||
    }
 | 
			
		||||
    baselen = p - libpath;
 | 
			
		||||
#define PREFIX_PATH() rb_str_new(libpath, baselen)
 | 
			
		||||
#else
 | 
			
		||||
    rb_str_set_len(sopath, p - libpath);
 | 
			
		||||
    baselen = p - libpath;
 | 
			
		||||
    rb_str_set_len(sopath, baselen);
 | 
			
		||||
    libpath = RSTRING_PTR(sopath);
 | 
			
		||||
#define PREFIX_PATH() sopath
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    baselen = p - libpath;
 | 
			
		||||
#define BASEPATH() rb_str_buf_cat(rb_str_buf_new(baselen+len), libpath, baselen)
 | 
			
		||||
 | 
			
		||||
#define RUBY_RELATIVE(path, len) rb_str_buf_cat(BASEPATH(), path, len)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue