+static
+int spc2000_data_init_(struct dcpu16_hw *hw, void *extra) {
+ (void)extra;
+
+ hw->data = calloc(1, sizeof(struct spc2000_));
+ if (hw->data == NULL) {
+ hw->vm->warn_cb_("%s():%s", "calloc", strerror(errno));
+ return -1;
+ }
+ return 0;
+}
+
+static
+void spc2000_data_free_(struct dcpu16_hw *hw) {
+ if (hw) {
+ if (hw->data) {
+ free(hw->data);
+ hw->data = NULL;
+ }
+ }
+}
+