blueloveTH 1 год назад
Родитель
Сommit
9e4277e87f
3 измененных файлов с 3 добавлено и 7 удалено
  1. 0 2
      include/pocketpy/gc.h
  2. 3 1
      include/pocketpy/tuplelist.h
  3. 0 4
      src/tuplelist.cpp

+ 0 - 2
include/pocketpy/gc.h

@@ -3,8 +3,6 @@
 #include "common.h"
 #include "common.h"
 #include "memory.h"
 #include "memory.h"
 #include "obj.h"
 #include "obj.h"
-#include "codeobject.h"
-#include "namedict.h"
 
 
 namespace pkpy {
 namespace pkpy {
 struct ManagedHeap{
 struct ManagedHeap{

+ 3 - 1
include/pocketpy/tuplelist.h

@@ -15,8 +15,10 @@ struct Tuple {
     int _size;
     int _size;
 
 
     Tuple(int n);
     Tuple(int n);
-    Tuple(const Tuple& other);
     Tuple(Tuple&& other) noexcept;
     Tuple(Tuple&& other) noexcept;
+    Tuple(const Tuple& other) = delete;
+    Tuple& operator=(const Tuple& other) = delete;
+    Tuple& operator=(Tuple&& other) = delete;
     ~Tuple();
     ~Tuple();
 
 
     Tuple(PyVar, PyVar);
     Tuple(PyVar, PyVar);

+ 0 - 4
src/tuplelist.cpp

@@ -11,10 +11,6 @@ Tuple::Tuple(int n){
     this->_size = 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 {
 Tuple::Tuple(Tuple&& other) noexcept {
     _size = other._size;
     _size = other._size;
     if(other.is_inlined()){
     if(other.is_inlined()){