File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1058,7 +1058,13 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
1058
1058
octave_swig_type *ptr;
1059
1059
public:
1060
1060
octave_swig_ref(octave_swig_type *_ptr = 0)
1061
- :ptr(_ptr) { }
1061
+ :ptr(_ptr)
1062
+ {
1063
+ // Ensure type_id() is set correctly
1064
+ if (t_id == -1) {
1065
+ t_id = octave_swig_ref::static_type_id();
1066
+ }
1067
+ }
1062
1068
1063
1069
~octave_swig_ref()
1064
1070
{ if (ptr) ptr->decref(); }
@@ -1199,8 +1205,13 @@ SWIGRUNTIME void swig_acquire_ownership_obj(void *vptr, int own);
1199
1205
public:
1200
1206
1201
1207
octave_swig_packed(swig_type_info *_type = 0, const void *_buf = 0, size_t _buf_len = 0)
1202
- : type(_type), buf((const char*)_buf, (const char*)_buf + _buf_len) {
1203
- }
1208
+ : type(_type), buf((const char*)_buf, (const char*)_buf + _buf_len)
1209
+ {
1210
+ // Ensure type_id() is set correctly
1211
+ if (t_id == -1) {
1212
+ t_id = octave_swig_packed::static_type_id();
1213
+ }
1214
+ }
1204
1215
1205
1216
bool copy(swig_type_info *outtype, void *ptr, size_t sz) const {
1206
1217
if (outtype && outtype != type)
You can’t perform that action at this time.
0 commit comments