mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 10:08:56 +01:00 
			
		
		
		
	girepository: Drop GIBoxedInfo
See the previous commit for details. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #3245
This commit is contained in:
		@@ -81,6 +81,7 @@ your code if integer type warnings are enabled.
 | 
			
		||||
| `g_union_info_get_copy_function` | [method@GIRepository.UnionInfo.get_copy_function_name] |
 | 
			
		||||
| `g_union_info_get_free_function` | [method@GIRepository.UnionInfo.get_free_function_name] |
 | 
			
		||||
| `GIInfoType` | Use [type@GObject.Type] directly |
 | 
			
		||||
| `GI_INFO_TYPE_BOXED` | Dropped in favour of [method@GIRepository.RegisteredTypeInfo.is_boxed] |
 | 
			
		||||
 | 
			
		||||
## Utility program renames from version 1.0 to 2.0
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -257,7 +257,6 @@ GI_DEFINE_BASE_INFO_TYPE (gi_enum_info, GI_INFO_TYPE_ENUM)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_flags_info, GI_INFO_TYPE_FLAGS)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_object_info, GI_INFO_TYPE_OBJECT)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_interface_info, GI_INFO_TYPE_INTERFACE)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_boxed_info, GI_INFO_TYPE_BOXED)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_constant_info, GI_INFO_TYPE_CONSTANT)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_value_info, GI_INFO_TYPE_VALUE)
 | 
			
		||||
GI_DEFINE_BASE_INFO_TYPE (gi_signal_info, GI_INFO_TYPE_SIGNAL)
 | 
			
		||||
@@ -296,7 +295,6 @@ gi_base_info_init_types (void)
 | 
			
		||||
          { GI_INFO_TYPE_FLAGS, "GIFlagsInfo", sizeof (GIFlagsInfo), gi_flags_info_class_init, GI_INFO_TYPE_ENUM, G_TYPE_FLAG_NONE },
 | 
			
		||||
          { GI_INFO_TYPE_OBJECT, "GIObjectInfo", sizeof (GIObjectInfo), gi_object_info_class_init, GI_INFO_TYPE_REGISTERED_TYPE, G_TYPE_FLAG_NONE },
 | 
			
		||||
          { GI_INFO_TYPE_INTERFACE, "GIInterfaceInfo", sizeof (GIInterfaceInfo), gi_interface_info_class_init, GI_INFO_TYPE_REGISTERED_TYPE, G_TYPE_FLAG_NONE },
 | 
			
		||||
          { GI_INFO_TYPE_BOXED, "GIBoxedInfo", sizeof (GIBoxedInfo), gi_boxed_info_class_init, GI_INFO_TYPE_REGISTERED_TYPE, G_TYPE_FLAG_NONE },
 | 
			
		||||
          { GI_INFO_TYPE_CONSTANT, "GIConstantInfo", sizeof (GIConstantInfo), gi_constant_info_class_init, 0, G_TYPE_FLAG_NONE },
 | 
			
		||||
          { GI_INFO_TYPE_VALUE, "GIValueInfo", sizeof (GIValueInfo), gi_value_info_class_init, 0, G_TYPE_FLAG_NONE },
 | 
			
		||||
          { GI_INFO_TYPE_SIGNAL, "GISignalInfo", sizeof (GISignalInfo), gi_signal_info_class_init, GI_INFO_TYPE_CALLABLE, G_TYPE_FLAG_NONE },
 | 
			
		||||
@@ -668,7 +666,6 @@ gi_base_info_get_name (GIBaseInfo *info)
 | 
			
		||||
    case GI_INFO_TYPE_FUNCTION:
 | 
			
		||||
    case GI_INFO_TYPE_CALLBACK:
 | 
			
		||||
    case GI_INFO_TYPE_STRUCT:
 | 
			
		||||
    case GI_INFO_TYPE_BOXED:
 | 
			
		||||
    case GI_INFO_TYPE_ENUM:
 | 
			
		||||
    case GI_INFO_TYPE_FLAGS:
 | 
			
		||||
    case GI_INFO_TYPE_OBJECT:
 | 
			
		||||
@@ -792,7 +789,6 @@ gi_base_info_is_deprecated (GIBaseInfo *info)
 | 
			
		||||
    case GI_INFO_TYPE_FUNCTION:
 | 
			
		||||
    case GI_INFO_TYPE_CALLBACK:
 | 
			
		||||
    case GI_INFO_TYPE_STRUCT:
 | 
			
		||||
    case GI_INFO_TYPE_BOXED:
 | 
			
		||||
    case GI_INFO_TYPE_ENUM:
 | 
			
		||||
    case GI_INFO_TYPE_FLAGS:
 | 
			
		||||
    case GI_INFO_TYPE_OBJECT:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
 | 
			
		||||
 * GObject introspection: Boxed type implementation
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright 2024 GNOME Foundation, Inc.
 | 
			
		||||
 *
 | 
			
		||||
 * SPDX-License-Identifier: LGPL-2.1-or-later
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Lesser General Public
 | 
			
		||||
 * License as published by the Free Software Foundation; either
 | 
			
		||||
 * version 2 of the License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This library is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
			
		||||
 * Lesser General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Lesser General Public
 | 
			
		||||
 * License along with this library; if not, write to the
 | 
			
		||||
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 | 
			
		||||
 * Boston, MA 02111-1307, USA.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "config.h"
 | 
			
		||||
 | 
			
		||||
#include <glib.h>
 | 
			
		||||
 | 
			
		||||
#include <girepository/girepository.h>
 | 
			
		||||
#include "gibaseinfo-private.h"
 | 
			
		||||
#include "girepository-private.h"
 | 
			
		||||
#include "gitypelib-internal.h"
 | 
			
		||||
#include "giboxedinfo.h"
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * GIBoxedInfo:
 | 
			
		||||
 *
 | 
			
		||||
 * A `GIBoxedInfo` represents a boxed type.
 | 
			
		||||
 *
 | 
			
		||||
 * There isn’t much you can do with a boxed type; `GIBoxedInfo` exists mainly to
 | 
			
		||||
 * tag the type.
 | 
			
		||||
 *
 | 
			
		||||
 * Since: 2.80
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
gi_boxed_info_class_init (gpointer g_class,
 | 
			
		||||
                          gpointer class_data)
 | 
			
		||||
{
 | 
			
		||||
  GIBaseInfoClass *info_class = g_class;
 | 
			
		||||
 | 
			
		||||
  info_class->info_type = GI_INFO_TYPE_BOXED;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,60 +0,0 @@
 | 
			
		||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
 | 
			
		||||
 * GObject introspection: Boxed types
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright 2024 GNOME Foundation, Inc.
 | 
			
		||||
 *
 | 
			
		||||
 * SPDX-License-Identifier: LGPL-2.1-or-later
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Lesser General Public
 | 
			
		||||
 * License as published by the Free Software Foundation; either
 | 
			
		||||
 * version 2 of the License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This library is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
			
		||||
 * Lesser General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Lesser General Public
 | 
			
		||||
 * License along with this library; if not, write to the
 | 
			
		||||
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 | 
			
		||||
 * Boston, MA 02111-1307, USA.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#if !defined (__GIREPOSITORY_H_INSIDE__) && !defined (GI_COMPILATION)
 | 
			
		||||
#error "Only <girepository.h> can be included directly."
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <girepository/gitypes.h>
 | 
			
		||||
 | 
			
		||||
G_BEGIN_DECLS
 | 
			
		||||
 | 
			
		||||
#define GI_TYPE_BOXED_INFO (gi_boxed_info_get_type ())
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * GI_BOXED_INFO:
 | 
			
		||||
 * @info: Info object which is subject to casting.
 | 
			
		||||
 *
 | 
			
		||||
 * Casts a [type@GIRepository.BoxedInfo] or derived pointer into a
 | 
			
		||||
 * `(GIBoxedInfo*)` pointer.
 | 
			
		||||
 *
 | 
			
		||||
 * Depending on the current debugging level, this function may invoke
 | 
			
		||||
 * certain runtime checks to identify invalid casts.
 | 
			
		||||
 *
 | 
			
		||||
 * Since: 2.80
 | 
			
		||||
 */
 | 
			
		||||
#define GI_BOXED_INFO(info) (G_TYPE_CHECK_INSTANCE_CAST ((info), GI_TYPE_BOXED_INFO, GIBoxedInfo))
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * GI_IS_BOXED_INFO:
 | 
			
		||||
 * @info: an info structure
 | 
			
		||||
 *
 | 
			
		||||
 * Checks if @info is a [class@GIRepository.BoxedInfo] (or a derived type).
 | 
			
		||||
 *
 | 
			
		||||
 * Since: 2.80
 | 
			
		||||
 */
 | 
			
		||||
#define GI_IS_BOXED_INFO(info) (G_TYPE_CHECK_INSTANCE_TYPE ((info), GI_TYPE_BOXED_INFO))
 | 
			
		||||
 | 
			
		||||
G_END_DECLS
 | 
			
		||||
@@ -278,7 +278,6 @@ gi_field_info_get_field (GIFieldInfo *field_info,
 | 
			
		||||
              {
 | 
			
		||||
              case GI_INFO_TYPE_STRUCT:
 | 
			
		||||
              case GI_INFO_TYPE_UNION:
 | 
			
		||||
              case GI_INFO_TYPE_BOXED:
 | 
			
		||||
                /* Needs to be handled by the language binding directly */
 | 
			
		||||
                break;
 | 
			
		||||
              case GI_INFO_TYPE_OBJECT:
 | 
			
		||||
@@ -464,7 +463,6 @@ gi_field_info_set_field (GIFieldInfo      *field_info,
 | 
			
		||||
              {
 | 
			
		||||
              case GI_INFO_TYPE_STRUCT:
 | 
			
		||||
              case GI_INFO_TYPE_UNION:
 | 
			
		||||
              case GI_INFO_TYPE_BOXED:
 | 
			
		||||
                /* Needs to be handled by the language binding directly */
 | 
			
		||||
                break;
 | 
			
		||||
              case GI_INFO_TYPE_OBJECT:
 | 
			
		||||
 
 | 
			
		||||
@@ -72,8 +72,6 @@ G_STATIC_ASSERT (G_ALIGNOF (GIBaseInfo) == G_ALIGNOF (GIBaseInfoStack));
 | 
			
		||||
 * @GI_INFO_TYPE_FUNCTION: function, see [class@GIRepository.FunctionInfo]
 | 
			
		||||
 * @GI_INFO_TYPE_CALLBACK: callback, see [class@GIRepository.FunctionInfo]
 | 
			
		||||
 * @GI_INFO_TYPE_STRUCT: struct, see [class@GIRepository.StructInfo]
 | 
			
		||||
 * @GI_INFO_TYPE_BOXED: boxed, see [class@GIRepository.StructInfo] or
 | 
			
		||||
 *   [class@GIRepository.UnionInfo]
 | 
			
		||||
 * @GI_INFO_TYPE_ENUM: enum, see [class@GIRepository.EnumInfo]
 | 
			
		||||
 * @GI_INFO_TYPE_FLAGS: flags, see [class@GIRepository.EnumInfo]
 | 
			
		||||
 * @GI_INFO_TYPE_OBJECT: object, see [class@GIRepository.ObjectInfo]
 | 
			
		||||
@@ -113,12 +111,13 @@ typedef enum
 | 
			
		||||
  GI_INFO_TYPE_FUNCTION,
 | 
			
		||||
  GI_INFO_TYPE_CALLBACK,
 | 
			
		||||
  GI_INFO_TYPE_STRUCT,
 | 
			
		||||
  GI_INFO_TYPE_BOXED,
 | 
			
		||||
  GI_INFO_TYPE_ENUM,             /*  5 */
 | 
			
		||||
  GI_INFO_TYPE_FLAGS,
 | 
			
		||||
  GI_INFO_TYPE_OBJECT,
 | 
			
		||||
  GI_INFO_TYPE_INTERFACE,
 | 
			
		||||
  GI_INFO_TYPE_CONSTANT,
 | 
			
		||||
  /* 4 is skipped, it used to be BOXED, but was removed in girepository 2.80.
 | 
			
		||||
   * It is still part of the binary format in GITypelibBlobType. */
 | 
			
		||||
  GI_INFO_TYPE_ENUM = 5,             /*  5 */
 | 
			
		||||
  GI_INFO_TYPE_FLAGS = 6,
 | 
			
		||||
  GI_INFO_TYPE_OBJECT = 7,
 | 
			
		||||
  GI_INFO_TYPE_INTERFACE = 8,
 | 
			
		||||
  GI_INFO_TYPE_CONSTANT = 9,
 | 
			
		||||
  /* 10 is skipped, it used to be used, but was removed before girepository-2.0
 | 
			
		||||
   * It is, however, part of the binary format in GITypelibBlobType */
 | 
			
		||||
  GI_INFO_TYPE_UNION = 11,
 | 
			
		||||
@@ -227,14 +226,6 @@ struct _GIInterfaceInfo
 | 
			
		||||
void gi_interface_info_class_init (gpointer g_class,
 | 
			
		||||
                                   gpointer class_data);
 | 
			
		||||
 | 
			
		||||
struct _GIBoxedInfo
 | 
			
		||||
{
 | 
			
		||||
  GIRegisteredTypeInfo parent;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
void gi_boxed_info_class_init (gpointer g_class,
 | 
			
		||||
                               gpointer class_data);
 | 
			
		||||
 | 
			
		||||
struct _GIConstantInfo
 | 
			
		||||
{
 | 
			
		||||
  GIBaseInfo parent;
 | 
			
		||||
 
 | 
			
		||||
@@ -2065,8 +2065,6 @@ gi_info_type_to_string (GIInfoType type)
 | 
			
		||||
      return "callback";
 | 
			
		||||
    case GI_INFO_TYPE_STRUCT:
 | 
			
		||||
      return "struct";
 | 
			
		||||
    case GI_INFO_TYPE_BOXED:
 | 
			
		||||
      return "boxed";
 | 
			
		||||
    case GI_INFO_TYPE_ENUM:
 | 
			
		||||
      return "enum";
 | 
			
		||||
    case GI_INFO_TYPE_FLAGS:
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,6 @@
 | 
			
		||||
 | 
			
		||||
#include <girepository/giarginfo.h>
 | 
			
		||||
#include <girepository/gibaseinfo.h>
 | 
			
		||||
#include <girepository/giboxedinfo.h>
 | 
			
		||||
#include <girepository/gicallableinfo.h>
 | 
			
		||||
#include <girepository/gicallbackinfo.h>
 | 
			
		||||
#include <girepository/giconstantinfo.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -1421,8 +1421,7 @@ gi_ir_writer_write (const char *filename,
 | 
			
		||||
            write_function_info (ns, (GIFunctionInfo *)info, xml);
 | 
			
		||||
          else if (GI_IS_CALLBACK_INFO (info))
 | 
			
		||||
            write_callback_info (ns, (GICallbackInfo *)info, xml);
 | 
			
		||||
          else if (GI_IS_STRUCT_INFO (info) ||
 | 
			
		||||
                   GI_IS_BOXED_INFO (info))
 | 
			
		||||
          else if (GI_IS_STRUCT_INFO (info))
 | 
			
		||||
            write_struct_info (ns, (GIStructInfo *)info, xml);
 | 
			
		||||
          else if (GI_IS_UNION_INFO (info))
 | 
			
		||||
            write_union_info (ns, (GIUnionInfo *)info, xml);
 | 
			
		||||
 
 | 
			
		||||
@@ -92,10 +92,6 @@ GI_AVAILABLE_IN_ALL GType gi_object_info_get_type (void);
 | 
			
		||||
typedef struct _GIInterfaceInfo GIInterfaceInfo;
 | 
			
		||||
GI_AVAILABLE_IN_ALL GType gi_interface_info_get_type (void);
 | 
			
		||||
 | 
			
		||||
/* Documented in giboxedinfo.c */
 | 
			
		||||
typedef struct _GIBoxedInfo GIBoxedInfo;
 | 
			
		||||
GI_AVAILABLE_IN_ALL GType gi_boxed_info_get_type (void);
 | 
			
		||||
 | 
			
		||||
/* Documented in giconstantinfo.c */
 | 
			
		||||
typedef struct _GIConstantInfo GIConstantInfo;
 | 
			
		||||
GI_AVAILABLE_IN_ALL GType gi_constant_info_get_type (void);
 | 
			
		||||
 
 | 
			
		||||
@@ -44,7 +44,6 @@ gi_visibility_h = custom_target(
 | 
			
		||||
girepo_headers = files(
 | 
			
		||||
  'giarginfo.h',
 | 
			
		||||
  'gibaseinfo.h',
 | 
			
		||||
  'giboxedinfo.h',
 | 
			
		||||
  'gicallableinfo.h',
 | 
			
		||||
  'gicallbackinfo.h',
 | 
			
		||||
  'giconstantinfo.h',
 | 
			
		||||
@@ -148,7 +147,6 @@ girepo_sources = files(
 | 
			
		||||
  'gdump.c',
 | 
			
		||||
  'giarginfo.c',
 | 
			
		||||
  'gibaseinfo.c',
 | 
			
		||||
  'giboxedinfo.c',
 | 
			
		||||
  'gicallableinfo.c',
 | 
			
		||||
  'gicallbackinfo.c',
 | 
			
		||||
  'giconstantinfo.c',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user