From f9acae7e15139255c6d6d362f5a7dccb300d2fea Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Wed, 20 Jan 2010 23:15:00 -0800 Subject: [PATCH] replace hardcoded variable sizes with the MachineBytes constant --- asm/binary.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asm/binary.rb b/asm/binary.rb index 78efe81..391fd92 100644 --- a/asm/binary.rb +++ b/asm/binary.rb @@ -205,7 +205,7 @@ module Assembler end # Define a variable with the given name and size in bytes. - def defvar(name, bytes=4) + def defvar(name, bytes=MachineBytes) unless @symtab.var?(name) @symtab.defvar(name, bytes) else @@ -235,7 +235,7 @@ module Assembler end # Define a variable unless it exists. - def var!(name, bytes=4) + def var!(name, bytes=MachineBytes) if var?(name) var(name) else