*fixed a referenced usertype cloning issue.
This commit is contained in:
parent
4eff522bcd
commit
3f570396c9
3
HISTORY
3
HISTORY
@ -1,3 +1,6 @@
|
|||||||
|
Sep. 13 2017
|
||||||
|
Fixed a referenced usertype cloning issue
|
||||||
|
|
||||||
Aug. 29 2017
|
Aug. 29 2017
|
||||||
Added a prompting for inputer
|
Added a prompting for inputer
|
||||||
|
|
||||||
|
@ -32,13 +32,15 @@
|
|||||||
#include "my_basic.h"
|
#include "my_basic.h"
|
||||||
#if defined ARDUINO && !defined MB_CP_ARDUINO
|
#if defined ARDUINO && !defined MB_CP_ARDUINO
|
||||||
# define MB_CP_ARDUINO
|
# define MB_CP_ARDUINO
|
||||||
|
#endif /* ARDUINO && !MB_CP_ARDUINO */
|
||||||
|
#ifdef MB_CP_ARDUINO
|
||||||
# ifndef MB_DISABLE_LOAD_FILE
|
# ifndef MB_DISABLE_LOAD_FILE
|
||||||
# define MB_DISABLE_LOAD_FILE
|
# define MB_DISABLE_LOAD_FILE
|
||||||
# endif /* MB_DISABLE_LOAD_FILE */
|
# endif /* MB_DISABLE_LOAD_FILE */
|
||||||
# ifndef MB_MANUAL_REAL_FORMATTING
|
# ifndef MB_MANUAL_REAL_FORMATTING
|
||||||
# define MB_MANUAL_REAL_FORMATTING
|
# define MB_MANUAL_REAL_FORMATTING
|
||||||
# endif /* MB_MANUAL_REAL_FORMATTING */
|
# endif /* MB_MANUAL_REAL_FORMATTING */
|
||||||
#endif /* ARDUINO && !MB_CP_ARDUINO */
|
#endif /* MB_CP_ARDUINO */
|
||||||
#ifdef MB_CP_VC
|
#ifdef MB_CP_VC
|
||||||
# include <conio.h>
|
# include <conio.h>
|
||||||
# include <locale.h>
|
# include <locale.h>
|
||||||
@ -9212,6 +9214,12 @@ static int _clone_object(mb_interpreter_t* s, _object_t* obj, _object_t* tgt, bo
|
|||||||
break;
|
break;
|
||||||
#ifdef MB_ENABLE_USERTYPE_REF
|
#ifdef MB_ENABLE_USERTYPE_REF
|
||||||
case _DT_USERTYPE_REF:
|
case _DT_USERTYPE_REF:
|
||||||
|
if(!obj->data.usertype_ref->clone) {
|
||||||
|
tgt->type = MB_DT_NIL;
|
||||||
|
tgt->data.integer = 0;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
tgt->data.usertype_ref = _create_usertype_ref(
|
tgt->data.usertype_ref = _create_usertype_ref(
|
||||||
obj->data.usertype_ref->ref.s,
|
obj->data.usertype_ref->ref.s,
|
||||||
obj->data.usertype_ref->clone(obj->data.usertype_ref->ref.s, obj->data.usertype_ref->usertype),
|
obj->data.usertype_ref->clone(obj->data.usertype_ref->ref.s, obj->data.usertype_ref->usertype),
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#if defined __BORLANDC__
|
#if defined ARDUINO
|
||||||
|
# define MB_CP_ARDUINO
|
||||||
|
#elif defined __BORLANDC__
|
||||||
# define MB_CP_BORLANDC
|
# define MB_CP_BORLANDC
|
||||||
#elif defined __clang__
|
#elif defined __clang__
|
||||||
# define MB_CP_CLANG
|
# define MB_CP_CLANG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user