gobject-introspection: support more number type constants.
							parent
							
								
									34f1f836eb
								
							
						
					
					
						commit
						c196f9f022
					
				|  | @ -67,11 +67,21 @@ M: incorrect-type type>c-type drop void* ; | ||||||
| 
 | 
 | ||||||
| GENERIC: parse-const-value ( str data-type -- value ) | GENERIC: parse-const-value ( str data-type -- value ) | ||||||
| 
 | 
 | ||||||
|  | : number-type? ( name -- ? ) | ||||||
|  |     { | ||||||
|  |         [ "gint" head? ] | ||||||
|  |         [ "guint" head? ] | ||||||
|  |         [ "gchar" = ] | ||||||
|  |         [ "guchar" = ] | ||||||
|  |         [ "gdouble" = ] | ||||||
|  |         [ "gfloat" = ] | ||||||
|  |     } 1|| ; | ||||||
|  | 
 | ||||||
| M: atomic-type parse-const-value | M: atomic-type parse-const-value | ||||||
|     name>> { |     name>> { | ||||||
|         { "gint" [ string>number ] } |         { [ dup number-type? ] [ drop string>number ] } | ||||||
|         { "gdouble" [ string>number ] } |         { [ dup "gboolean" = ] [ drop "true" = ] } | ||||||
|     } case ; |     } cond ; | ||||||
| 
 | 
 | ||||||
| M: utf8-type parse-const-value drop ; | M: utf8-type parse-const-value drop ; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue