[gnome-builder] lsp: formatter should not be a final type



commit 392726a79b8da2ff00b2d7ea3fb7400b89cfda37
Author: Christian Hergert <chergert redhat com>
Date:   Thu Aug 5 11:05:48 2021 -0700

    lsp: formatter should not be a final type
    
    This is fallout from using G_DEFINE_FINAL_TYPE() because the code was
    wrong to begin with.

 src/libide/lsp/ide-lsp-formatter.c | 2 +-
 src/libide/lsp/ide-lsp-formatter.h | 9 +++------
 2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/libide/lsp/ide-lsp-formatter.c b/src/libide/lsp/ide-lsp-formatter.c
index 9ef3242d8..2f006c2dd 100644
--- a/src/libide/lsp/ide-lsp-formatter.c
+++ b/src/libide/lsp/ide-lsp-formatter.c
@@ -42,7 +42,7 @@ enum {
 
 static void formatter_iface_init (IdeFormatterInterface *iface);
 
-G_DEFINE_FINAL_TYPE_WITH_CODE (IdeLspFormatter, ide_lsp_formatter, IDE_TYPE_OBJECT,
+G_DEFINE_TYPE_WITH_CODE (IdeLspFormatter, ide_lsp_formatter, IDE_TYPE_OBJECT,
                          G_ADD_PRIVATE (IdeLspFormatter)
                          G_IMPLEMENT_INTERFACE (IDE_TYPE_FORMATTER, formatter_iface_init))
 
diff --git a/src/libide/lsp/ide-lsp-formatter.h b/src/libide/lsp/ide-lsp-formatter.h
index 4e77ec4fe..915c8eb1d 100644
--- a/src/libide/lsp/ide-lsp-formatter.h
+++ b/src/libide/lsp/ide-lsp-formatter.h
@@ -33,14 +33,11 @@ G_BEGIN_DECLS
 #define IDE_TYPE_LSP_FORMATTER (ide_lsp_formatter_get_type())
 
 IDE_AVAILABLE_IN_3_32
-G_DECLARE_FINAL_TYPE (IdeLspFormatter, ide_lsp_formatter, IDE, LSP_FORMATTER, IdeObject)
+G_DECLARE_DERIVABLE_TYPE (IdeLspFormatter, ide_lsp_formatter, IDE, LSP_FORMATTER, IdeObject)
 
-struct _IdeLspFormatter
+struct _IdeLspFormatterClass
 {
-  IdeObject parent_class;
-
-  /*< private >*/
-  gpointer _reserved[4];
+  IdeObjectClass parent_class;
 };
 
 IDE_AVAILABLE_IN_3_32


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]