Skip to content

Commit 9aa7150

Browse files
committed
Script: Add getter for bytecode vector
1 parent 26da8ad commit 9aa7150

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/engine/script.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ unsigned int *Script::bytecode() const
1717
return m_bytecode;
1818
}
1919

20+
/*! Returns the bytecode vector. */
21+
const std::vector<unsigned int> &Script::bytecodeVector() const
22+
{
23+
return m_bytecodeVector;
24+
}
25+
2026
/*! Sets the bytecode of the script. */
2127
void Script::setBytecode(const std::vector<unsigned int> &code)
2228
{

src/engine/script.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class LIBSCRATCHCPP_EXPORT Script
1515
Script(const Script &) = delete;
1616

1717
unsigned int *bytecode() const;
18+
const std::vector<unsigned int> &bytecodeVector() const;
1819
void setBytecode(const std::vector<unsigned int> &code);
1920

2021
void setProcedures(const std::vector<unsigned int *> &procedures);

0 commit comments

Comments
 (0)