私はこのようなものを扱っていますが、エラーがスローされています。
配列を変数に入れてそのように渡すだけですが、このようなパターン化されていないデータのような約500行を見ています。(だからループは使えない)
その上、GSList を使用することの要点は、ジャグ配列の制限を回避することでした。
list43333 = g_slist_append(list43333,{11,12,13,14,15,17,18,20,22,25,30});
編集: `(int[]) でキャストすると、次のようになります:
csgtk.h:14: warning: data definition has no type or storage class
csgtk.h:14: warning: type defaults to ‘int’ in declaration of ‘list43333’
csgtk.h:14: error: conflicting types for ‘list43333’
csgtk.h:12: note: previous definition of ‘list43333’ was here
csgtk.h:14: warning: passing argument 1 of ‘g_slist_append’ makes pointer from integer without a cast
/usr/include/glib-2.0/glib/gslist.h:52: note: expected ‘struct GSList *’ but argument is of type ‘int’
csgtk.h:14: warning: initialization makes integer from pointer without a cast
csgtk.h:14: error: initializer element is not constant
編集:範囲外ではないことを示すための文字通りのコピーペースト(注、これは .h ファイルの最上位にあります):
GSList * list43333 = NULL;
list43333 = g_slist_prepend(list43333,(int[]){});
メインファイル
#include "csgtk.h"
GHashTable * widgetbuffer;
[...]