Skip to content

Commit 18ebea2

Browse files
committed
Partly revert unique_ptr
1 parent d2708d0 commit 18ebea2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/ft2font_wrapper.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ const char *PyGlyph__doc__ = R"""(
317317
<https://freetype.org/freetype2/docs/glyphs/glyphs-3.html>`_.
318318
)""";
319319

320-
static std::unique_ptr<PyGlyph>
320+
static PyGlyph *
321321
PyGlyph_from_FT2Font(const FT2Font *font)
322322
{
323323
const FT_Face &face = font->get_face();
324324
const FT_Glyph &glyph = font->get_last_glyph();
325325

326-
std::unique_ptr<PyGlyph> self = std::make_unique<PyGlyph>();
326+
PyGlyph* self = new PyGlyph();
327327

328328
self->glyphInd = font->get_last_glyph_index();
329329
FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_subpixels, &self->bbox);
@@ -740,7 +740,7 @@ const char *PyFT2Font_load_char__doc__ = R"""(
740740
.set_charmap
741741
)""";
742742

743-
static std::unique_ptr<PyGlyph>
743+
static PyGlyph *
744744
PyFT2Font_load_char(PyFT2Font *self, long charcode,
745745
LoadFlags flags = LoadFlags::FORCE_AUTOHINT)
746746
{
@@ -778,7 +778,7 @@ const char *PyFT2Font_load_glyph__doc__ = R"""(
778778
.load_char
779779
)""";
780780

781-
static std::unique_ptr<PyGlyph>
781+
static PyGlyph *
782782
PyFT2Font_load_glyph(PyFT2Font *self, FT_UInt glyph_index,
783783
LoadFlags flags = LoadFlags::FORCE_AUTOHINT)
784784
{

0 commit comments

Comments
 (0)