Skip to content

Commit 30997d7

Browse files
committed
Use copy instead of deepcopy for copy constructor
1 parent 0660bba commit 30997d7

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

include/jlcxx/jlcxx_config.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#endif
1515

1616
#define JLCXX_VERSION_MAJOR 0
17-
#define JLCXX_VERSION_MINOR 7
18-
#define JLCXX_VERSION_PATCH 2
17+
#define JLCXX_VERSION_MINOR 8
18+
#define JLCXX_VERSION_PATCH 0
1919

2020
// From https://stackoverflow.com/questions/5459868/concatenate-int-to-string-using-c-preprocessor
2121
#define __JLCXX_STR_HELPER(x) #x

include/jlcxx/module.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ class JLCXX_API Module
669669
if constexpr (CopyConstructible<T>::value)
670670
{
671671
set_override_module(jl_base_module);
672-
method("deepcopy_internal", [this](const T& other, ObjectIdDict)
672+
method("copy", [this](const T& other)
673673
{
674674
return create<T>(other);
675675
});

include/jlcxx/type_conversion.hpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -999,24 +999,6 @@ struct julia_type_factory<BoxedValue<T>>
999999
static jl_datatype_t* julia_type() { return jl_any_type; }
10001000
};
10011001

1002-
// Helper for ObjectIdDict
1003-
struct ObjectIdDict {};
1004-
1005-
template<> struct static_type_mapping<ObjectIdDict>
1006-
{
1007-
typedef jl_value_t* type;
1008-
};
1009-
1010-
// Used for deepcopy_internal overloading
1011-
template<>
1012-
struct ConvertToCpp<ObjectIdDict>
1013-
{
1014-
ObjectIdDict operator()(jl_value_t*) const
1015-
{
1016-
return ObjectIdDict();
1017-
}
1018-
};
1019-
10201002
/// Helper for Singleton types (Type{T} in Julia)
10211003
template<typename T>
10221004
struct SingletonType

src/jlcxx.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ JLCXX_API void register_core_types()
374374

375375
jlcxx::detail::AddIntegerTypes<fixed_int_types>()("Int", "");
376376

377-
set_julia_type<ObjectIdDict>((jl_datatype_t*)julia_type("IdDict", jl_base_module),false);
378377
set_julia_type<jl_datatype_t*>(jl_any_type,false);
379378
set_julia_type<jl_value_t*>(jl_any_type,false);
380379
registered = true;

0 commit comments

Comments
 (0)