File tree Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Expand file tree Collapse file tree 4 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,11 @@ class BufferRegion : public Py::PythonExtension<BufferRegion>
107107 data = NULL ;
108108 }
109109 };
110+
111+ private:
112+ // prevent copying
113+ BufferRegion (const BufferRegion&);
114+ BufferRegion& operator =(const BufferRegion&);
110115};
111116
112117class GCAgg
@@ -284,6 +289,10 @@ class RendererAgg: public Py::PythonExtension<RendererAgg>
284289
285290private:
286291 void create_alpha_buffers ();
292+
293+ // prevent copying
294+ RendererAgg (const RendererAgg&);
295+ RendererAgg& operator =(const RendererAgg&);
287296};
288297
289298// the extension module
@@ -306,6 +315,10 @@ class _backend_agg_module : public Py::ExtensionModule<_backend_agg_module>
306315private:
307316
308317 Py::Object new_renderer (const Py::Tuple &args, const Py::Dict &kws);
318+
319+ // prevent copying
320+ _backend_agg_module (const _backend_agg_module&);
321+ _backend_agg_module& operator =(const _backend_agg_module&);
309322};
310323
311324
Original file line number Diff line number Diff line change @@ -118,6 +118,9 @@ class Image : public Py::PythonExtension<Image>
118118 static char get_resample__doc__[];
119119 static char set_resample__doc__[];
120120
121+ // prevent copying
122+ Image (const Image&);
123+ Image& operator =(const Image&);
121124};
122125
123126
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ class FT2Image : public Py::PythonClass<FT2Image>
7575 unsigned long _height;
7676
7777 void resize (long width, long height);
78+
79+ // prevent copying
80+ FT2Image (const FT2Image&);
81+ FT2Image& operator =(const FT2Image&);
7882};
7983
8084class Glyph : public Py ::PythonClass<Glyph>
@@ -90,6 +94,10 @@ class Glyph : public Py::PythonClass<Glyph>
9094 size_t glyphInd;
9195private:
9296 Py::Dict __dict__;
97+
98+ // prevent copying
99+ Glyph (const Glyph&);
100+ Glyph& operator =(const Glyph&);
93101};
94102
95103class FT2Font : public Py ::PythonClass<FT2Font>
@@ -172,15 +180,23 @@ class FT2Font : public Py::PythonClass<FT2Font>
172180 static char get_image__doc__[];
173181 static char attach_file__doc__[];
174182 static char get_path__doc__[];
183+
184+ // prevent copying
185+ FT2Font (const FT2Font&);
186+ FT2Font& operator =(const FT2Font&);
175187};
176188
177189// the extension module
178190class ft2font_module : public Py ::ExtensionModule<ft2font_module>
179-
180191{
181192public:
182193 ft2font_module ();
183194 virtual ~ft2font_module ();
195+
196+ private:
197+ // prevent copying
198+ ft2font_module (const ft2font_module&);
199+ ft2font_module operator =(const ft2font_module&);
184200};
185201
186202#endif
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ class Printf
4545{
4646private :
4747 char *buffer;
48+ // prevent copying
49+ Printf (const Printf&);
50+ Printf& operator =(const Printf&);
4851public :
4952 Printf (const char *, ...);
5053 ~Printf ();
You can’t perform that action at this time.
0 commit comments