Store Nix integers as longs
So on 64-bit systems, integers are now 64-bit. Fixes #158.
This commit is contained in:
		
							parent
							
								
									297b762513
								
							
						
					
					
						commit
						d308aeaf53
					
				
					 9 changed files with 25 additions and 23 deletions
				
			
		|  | @ -1024,7 +1024,7 @@ static void prim_mul(EvalState & state, Value * * args, Value & v) | |||
| 
 | ||||
| static void prim_div(EvalState & state, Value * * args, Value & v) | ||||
| { | ||||
|     int i2 = state.forceInt(*args[1]); | ||||
|     NixInt i2 = state.forceInt(*args[1]); | ||||
|     if (i2 == 0) throw EvalError("division by zero"); | ||||
|     mkInt(v, state.forceInt(*args[0]) / i2); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue