Commit 5d72c88c authored by Kirill Smelkov's avatar Kirill Smelkov

libgolang: Mark classes that we "don't copy" also as "don't move"

Be on safe side: both aspects - copy and move - are forbidden for all
those internal classes.
parent f5b13f3f
...@@ -141,6 +141,7 @@ struct Sema { ...@@ -141,6 +141,7 @@ struct Sema {
private: private:
Sema(const Sema&); // don't copy Sema(const Sema&); // don't copy
Sema(Sema&&); // don't move
}; };
Sema::Sema() { Sema::Sema() {
...@@ -178,6 +179,7 @@ struct Mutex { ...@@ -178,6 +179,7 @@ struct Mutex {
private: private:
Sema _sema; Sema _sema;
Mutex(const Mutex&); // don't copy Mutex(const Mutex&); // don't copy
Mutex(Mutex&&); // don't move
}; };
// with_lock mimics `with mu` from python. // with_lock mimics `with mu` from python.
...@@ -194,6 +196,7 @@ struct _deferred { ...@@ -194,6 +196,7 @@ struct _deferred {
~_deferred() { f(); } ~_deferred() { f(); }
private: private:
_deferred(const _deferred&); // don't copy _deferred(const _deferred&); // don't copy
_deferred(_deferred&&); // don't move
}; };
// ---- channels ----- // ---- channels -----
...@@ -245,6 +248,7 @@ struct _chan { ...@@ -245,6 +248,7 @@ struct _chan {
void _dataq_popleft(void *prx); void _dataq_popleft(void *prx);
private: private:
_chan(const _chan&); // don't copy _chan(const _chan&); // don't copy
_chan(_chan&&); // don't move
template<bool onstack> void _send2 (const void *); template<bool onstack> void _send2 (const void *);
void __send2 (const void *, _WaitGroup*, _RecvSendWaiting*); void __send2 (const void *, _WaitGroup*, _RecvSendWaiting*);
...@@ -273,6 +277,7 @@ struct _RecvSendWaiting { ...@@ -273,6 +277,7 @@ struct _RecvSendWaiting {
void wakeup(bool ok); void wakeup(bool ok);
private: private:
_RecvSendWaiting(const _RecvSendWaiting&); // don't copy _RecvSendWaiting(const _RecvSendWaiting&); // don't copy
_RecvSendWaiting(_RecvSendWaiting&&); // don't move
}; };
// _WaitGroup is a group of waiting senders and receivers. // _WaitGroup is a group of waiting senders and receivers.
...@@ -292,6 +297,7 @@ struct _WaitGroup { ...@@ -292,6 +297,7 @@ struct _WaitGroup {
void wakeup(); void wakeup();
private: private:
_WaitGroup(const _WaitGroup&); // don't copy _WaitGroup(const _WaitGroup&); // don't copy
_WaitGroup(_WaitGroup&&); // don't move
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment