Rev 1011 | Rev 1024 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1011 | Rev 1012 | ||
|---|---|---|---|
| Line 605... | Line 605... | ||
| 605 | 605 | ||
| 606 | Handle<Value> VirtualMachine::_bin2uint(const Arguments& args) |
606 | Handle<Value> VirtualMachine::_bin2uint(const Arguments& args) |
| 607 | { |
607 | { |
| 608 | String::AsciiValue bin(args[0]); |
608 | String::AsciiValue bin(args[0]); |
| 609 | unsigned int num = bin2uint(*bin); |
609 | unsigned int num = bin2uint(*bin); |
| 610 | return |
610 | return Number::New(num); |
| 611 | } |
611 | } |
| 612 | 612 | ||
| 613 | Handle<Value> VirtualMachine::_uint2bin(const Arguments& args) |
613 | Handle<Value> VirtualMachine::_uint2bin(const Arguments& args) |
| 614 | { |
614 | { |
| 615 | string bin = uint2bin(args[0]->Uint32Value(), args[1]->Uint32Value()); |
615 | string bin = uint2bin(args[0]->Uint32Value(), args[1]->Uint32Value()); |
| Line 618... | Line 618... | ||
| 618 | 618 | ||
| 619 | Handle<Value> VirtualMachine::_hex2uint(const Arguments& args) |
619 | Handle<Value> VirtualMachine::_hex2uint(const Arguments& args) |
| 620 | { |
620 | { |
| 621 | String::AsciiValue hex(args[0]); |
621 | String::AsciiValue hex(args[0]); |
| 622 | unsigned int num = hex2uint(*hex); |
622 | unsigned int num = hex2uint(*hex); |
| 623 | return |
623 | return Number::New(num); |
| 624 | } |
624 | } |