Fix mruby bindings #197
					 2 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -71,8 +71,7 @@ static const MrbExcData excData[] =
 | 
			
		|||
	{ Shutdown, "SystemExit"  },
 | 
			
		||||
| 
					
	
 Yeah. If I remember right, this throws up some error about  Yeah. If I remember right, this throws up some error about `IOError` already existing. 
			
			
		Should I rename this to something better? Should I rename this to something better? 
			
			
		This is from the io-gem too, right. Just delete this entry in the array, and query the existing error class like done here: https://github.com/Ancurio/mkxp/blob/master/binding-mruby/binding-util.cpp#L120 This is from the io-gem too, right. Just delete this entry in the array, and query the existing error class like done here: https://github.com/Ancurio/mkxp/blob/master/binding-mruby/binding-util.cpp#L120 
			
			
		Did this, but tbh I've no idea what's going on here Did this, but tbh I've no idea what's going on here 
			
			
		 | 
			||||
	{ PHYSFS,   "PHYSFSError" },
 | 
			
		||||
	{ SDL,      "SDLError"    },
 | 
			
		||||
	{ MKXP,     "MKXPError"   },
 | 
			
		||||
	{ IO,       "IOError2"     }
 | 
			
		||||
	{ MKXP,     "MKXPError"   }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
static elementsN(excData);
 | 
			
		||||
| 
						 | 
				
			
			@ -118,6 +117,7 @@ MrbData::MrbData(mrb_state *mrb)
 | 
			
		|||
 | 
			
		||||
	exc[TypeError] = mrb_class_get(mrb, "TypeError");
 | 
			
		||||
	exc[ArgumentError] = mrb_class_get(mrb, "ArgumentError");
 | 
			
		||||
	exc[IOError] = mrb_class_get(mrb, "IOError");
 | 
			
		||||
 | 
			
		||||
	for (size_t i = 0; i < symDataN; ++i)
 | 
			
		||||
		symbols[symData[i].ind] = mrb_intern_cstr(mrb, symData[i].str);
 | 
			
		||||
| 
						 | 
				
			
			@ -134,6 +134,7 @@ static const MrbException excToMrbExc[] =
 | 
			
		|||
 | 
			
		||||
	TypeError,
 | 
			
		||||
	ArgumentError,
 | 
			
		||||
	IOError,
 | 
			
		||||
 | 
			
		||||
	PHYSFS,      /* PHYSFSError */
 | 
			
		||||
	SDL,         /* SDLError    */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,6 +91,7 @@ enum MrbException
 | 
			
		|||
 | 
			
		||||
	TypeError,
 | 
			
		||||
	ArgumentError,
 | 
			
		||||
	IOError,
 | 
			
		||||
 | 
			
		||||
	MrbExceptionsMax
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
Why the rename? Is
IOErroralready defined by mruby?