mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	Add gdk-pixbuf.gidl as an example, and fix the code to handle it.
This commit is contained in:
		
				
					committed by
					
						 Philip Withnall
						Philip Withnall
					
				
			
			
				
	
			
			
			
						parent
						
							45cf94a492
						
					
				
				
					commit
					45405a6143
				
			| @@ -106,23 +106,36 @@ write_type_info (const gchar *namespace, | |||||||
|   else if (tag == 22) |   else if (tag == 22) | ||||||
|     { |     { | ||||||
|       type = g_type_info_get_param_type (info, 0); |       type = g_type_info_get_param_type (info, 0); | ||||||
|       g_fprintf (file, "GList<"); |       g_fprintf (file, "GList"); | ||||||
|  |       if (type) | ||||||
|  | 	{ | ||||||
|  | 	  g_fprintf (file, "<");  | ||||||
| 	  write_type_info (namespace, type, file); | 	  write_type_info (namespace, type, file); | ||||||
| 	  g_fprintf (file, ">");  | 	  g_fprintf (file, ">");  | ||||||
| 	  g_base_info_unref ((GIBaseInfo *)type); | 	  g_base_info_unref ((GIBaseInfo *)type); | ||||||
| 	} | 	} | ||||||
|  |       g_fprintf (file, "*"); | ||||||
|  |     } | ||||||
|   else if (tag == 23) |   else if (tag == 23) | ||||||
|     { |     { | ||||||
|       type = g_type_info_get_param_type (info, 0); |       type = g_type_info_get_param_type (info, 0); | ||||||
|       g_fprintf (file, "GSList<"); |       g_fprintf (file, "GSList"); | ||||||
|  |       if (type) | ||||||
|  | 	{ | ||||||
|  | 	  g_fprintf (file, "<");  | ||||||
| 	  write_type_info (namespace, type, file); | 	  write_type_info (namespace, type, file); | ||||||
| 	  g_fprintf (file, ">");  | 	  g_fprintf (file, ">");  | ||||||
| 	  g_base_info_unref ((GIBaseInfo *)type); | 	  g_base_info_unref ((GIBaseInfo *)type); | ||||||
| 	} | 	} | ||||||
|  |       g_fprintf (file, "*"); | ||||||
|  |     } | ||||||
|   else if (tag == 24) |   else if (tag == 24) | ||||||
|     { |     { | ||||||
|       type = g_type_info_get_param_type (info, 0); |       type = g_type_info_get_param_type (info, 0); | ||||||
|       g_fprintf (file, "GHashTable<"); |       g_fprintf (file, "GHashTable"); | ||||||
|  |       if (type) | ||||||
|  | 	{ | ||||||
|  | 	  g_fprintf (file, "<");  | ||||||
| 	  write_type_info (namespace, type, file); | 	  write_type_info (namespace, type, file); | ||||||
| 	  g_base_info_unref ((GIBaseInfo *)type); | 	  g_base_info_unref ((GIBaseInfo *)type); | ||||||
| 	  type = g_type_info_get_param_type (info, 1); | 	  type = g_type_info_get_param_type (info, 1); | ||||||
| @@ -131,10 +144,18 @@ write_type_info (const gchar *namespace, | |||||||
| 	  g_fprintf (file, ">");  | 	  g_fprintf (file, ">");  | ||||||
| 	  g_base_info_unref ((GIBaseInfo *)type); | 	  g_base_info_unref ((GIBaseInfo *)type); | ||||||
| 	} | 	} | ||||||
|  |       g_fprintf (file, "*"); | ||||||
|  |     } | ||||||
|   else if (tag == 25)  |   else if (tag == 25)  | ||||||
|     { |     { | ||||||
|       g_fprintf (file, "GError<"); |       gint n; | ||||||
|       for (i = 0; i < g_type_info_get_n_error_domains (info); i++) |  | ||||||
|  |       g_fprintf (file, "GError"); | ||||||
|  |       n = g_type_info_get_n_error_domains (info); | ||||||
|  |       if (n > 0) | ||||||
|  | 	{ | ||||||
|  | 	  g_fprintf (file, "<");  | ||||||
|  | 	  for (i = 0; i < n; i++) | ||||||
| 	    { | 	    { | ||||||
| 	      GIErrorDomainInfo *ed = g_type_info_get_error_domain (info, i); | 	      GIErrorDomainInfo *ed = g_type_info_get_error_domain (info, i); | ||||||
| 	      if (i > 0) | 	      if (i > 0) | ||||||
| @@ -144,6 +165,8 @@ write_type_info (const gchar *namespace, | |||||||
| 	    } | 	    } | ||||||
| 	  g_fprintf (file, ">"); | 	  g_fprintf (file, ">"); | ||||||
| 	} | 	} | ||||||
|  |       g_fprintf (file, "*"); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| static void | static void | ||||||
| @@ -234,7 +257,7 @@ write_callable_info (const gchar    *namespace, | |||||||
| 	} | 	} | ||||||
|     } |     } | ||||||
|   if (g_callable_info_may_return_null (info)) |   if (g_callable_info_may_return_null (info)) | ||||||
|     g_fprintf (file, "null-ok=\"1\""); |     g_fprintf (file, " null-ok=\"1\""); | ||||||
|  |  | ||||||
|   g_fprintf (file, " />\n"); |   g_fprintf (file, " />\n"); | ||||||
| 	 | 	 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user