Unified · Split
| @@ -52,7 +52,7 @@ namespace disvm · 51 unmodified lines | |||
| 52 | 52 | ||
| 53 | public: | 53 | public: |
| 54 | // Get the VM version. | 54 | // Get the VM version. |
| 55 | // All fields on the input structure will be set. | 55 | // All fields on the output structure will be set. |
| 56 | vm_version_t get_version() const; | 56 | vm_version_t get_version() const; |
| 57 | 57 | ||
| 58 | // Begin execution of the module at the supplied path | 58 | // Begin execution of the module at the supplied path |
| @@ -0,0 +1,15 @@ | |||
| 1 | // | ||
| 2 | // Dis VM | ||
| 3 | // File: vm_version.h | ||
| 4 | // Author: arr | ||
| 5 | // | ||
| 6 | |||
| 7 | #ifndef _DISVM_SRC_INCLUDE_VM_VERSION_H_ | ||
| 8 | #define _DISVM_SRC_INCLUDE_VM_VERSION_H_ | ||
| 9 | |||
| 10 | #define DISVM_VERSION_MAJOR 1 | ||
| 11 | #define DISVM_VERSION_MINOR 0 | ||
| 12 | #define DISVM_VERSION_PATCH 0 | ||
| 13 | #define DISVM_VERSION_LABEL "alpha" | ||
| 14 | |||
| 15 | #endif // _DISVM_SRC_INCLUDE_VM_VERSION_H_ | ||
| @@ -12,6 +12,7 @@ · 11 unmodified lines | |||
| 12 | #include <runtime.h> | 12 | #include <runtime.h> |
| 13 | #include <exceptions.h> | 13 | #include <exceptions.h> |
| 14 | #include <builtin_module.h> | 14 | #include <builtin_module.h> |
| 15 | #include <vm_version.h> | ||
| 15 | #include "scheduler.h" | 16 | #include "scheduler.h" |
| 16 | #include "garbage_collector.h" | 17 | #include "garbage_collector.h" |
| 17 | 18 | ||
| @@ -82,7 +83,7 @@ vm_t::~vm_t() · 64 unmodified lines | |||
| 82 | 83 | ||
| 83 | vm_version_t vm_t::get_version() const | 84 | vm_version_t vm_t::get_version() const |
| 84 | { | 85 | { |
| 85 | return{ 1, 0, 0, "alpha" }; | 86 | return{ DISVM_VERSION_MAJOR, DISVM_VERSION_MINOR, DISVM_VERSION_PATCH, DISVM_VERSION_LABEL }; |
| 86 | } | 87 | } |
| 87 | 88 | ||
| 88 | namespace | 89 | namespace |