From 9e4277e87f48fd229c674eac2c0dafc75daa703f Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 2 Jun 2024 03:10:13 +0800 Subject: [PATCH] some fix --- include/pocketpy/gc.h | 2 -- include/pocketpy/tuplelist.h | 4 +++- src/tuplelist.cpp | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/pocketpy/gc.h b/include/pocketpy/gc.h index 3550dde1..c3831238 100644 --- a/include/pocketpy/gc.h +++ b/include/pocketpy/gc.h @@ -3,8 +3,6 @@ #include "common.h" #include "memory.h" #include "obj.h" -#include "codeobject.h" -#include "namedict.h" namespace pkpy { struct ManagedHeap{ diff --git a/include/pocketpy/tuplelist.h b/include/pocketpy/tuplelist.h index 43479678..fa1cc50c 100644 --- a/include/pocketpy/tuplelist.h +++ b/include/pocketpy/tuplelist.h @@ -15,8 +15,10 @@ struct Tuple { int _size; Tuple(int n); - Tuple(const Tuple& other); Tuple(Tuple&& other) noexcept; + Tuple(const Tuple& other) = delete; + Tuple& operator=(const Tuple& other) = delete; + Tuple& operator=(Tuple&& other) = delete; ~Tuple(); Tuple(PyVar, PyVar); diff --git a/src/tuplelist.cpp b/src/tuplelist.cpp index 6c86c7a1..b3334489 100644 --- a/src/tuplelist.cpp +++ b/src/tuplelist.cpp @@ -11,10 +11,6 @@ Tuple::Tuple(int n){ this->_size = n; } -Tuple::Tuple(const Tuple& other): Tuple(other._size){ - for(int i=0; i<_size; i++) _args[i] = other._args[i]; -} - Tuple::Tuple(Tuple&& other) noexcept { _size = other._size; if(other.is_inlined()){