Skip to content

Commit 8364a19

Browse files
authored
Merge pull request #10 from bakervm/release/0.2.1
Made call and ret methods public
2 parents aa7fee9 + 2504b03 commit 8364a19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "melon"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = ["Julian Laubstein <[email protected]>"]
55
description = "A library for creating retro computing platforms"
66
repository = "https://github.com/bakervm/melon"

src/vm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,14 @@ impl VM {
795795
}
796796

797797
/// Calls the function at the given address
798-
fn call(&mut self, addr: Address) {
798+
pub fn call(&mut self, addr: Address) {
799799
let call = self.pc;
800800
self.call_stack.push_front(call);
801801
self.pc = addr;
802802
}
803803

804804
/// Returns from a function call
805-
fn ret(&mut self) -> Result<()> {
805+
pub fn ret(&mut self) -> Result<()> {
806806
let return_addr = self.call_stack
807807
.pop_front()
808808
.ok_or(format_err!("cannot return from an empty call stack"))?;

0 commit comments

Comments
 (0)