diff --git a/gintro/gimplgobj.nim b/gintro/gimplgobj.nim index f73496a..705fb0a 100644 --- a/gintro/gimplgobj.nim +++ b/gintro/gimplgobj.nim @@ -200,7 +200,10 @@ proc $1$2 {.cdecl.} = if resl == "int32": resu.add(".int32") - + + if resl == "cstring": + resu.add(".g_strdup") + r1s.add(resu & "\n") all = all.replace(")", "; user_data: pointer)") diff --git a/tests/gen.nim b/tests/gen.nim index 464f01d..9622e88 100644 --- a/tests/gen.nim +++ b/tests/gen.nim @@ -1,6 +1,6 @@ # High level gobject-introspection based GTK4/GTK3 bindings for the Nim programming language # nimpretty --maxLineLen:130 gen.nim -# v 0.9.4 2021-JUL-19 +# v 0.9.4 2021-JUL-21 # (c) S. Salewski 2018, 2019, 2020, 2021 # usefull for finding death code: @@ -1862,7 +1862,7 @@ proc writeMethod(info: GIBaseInfo; minfo: GIFunctionInfo) = # export only low level symbols that are needed internally -- maybe we should export only a private name for them if run == 0 and not tryOut2Ret: if sym in ["g_quark_from_static_string", "g_error_free", "g_object_get_qdata", "g_object_ref_sink", "g_object_unref", "g_param_spec_ref_sink", - "g_timeout_add_full", "g_object_is_floating", "gst_bus_add_watch_full", "g_object_ref", "g_date_time_format", "gdk_event_ref", + "g_timeout_add_full", "g_object_is_floating", "gst_bus_add_watch_full", "g_object_ref", "g_date_time_format", "gdk_event_ref", "g_strdup", "g_type_from_name", "g_type_check_instance_is_a", "g_idle_add_full", "g_quark_try_string", "vte_regex_unref", "gtk_expression_ref", "gtk_builder_get_object", "g_action_map_add_action", "gtk_drawing_area_set_draw_func", "g_io_add_watch_full"]: methodBuffer.write("\nproc " & sym & EM & pars.plist) @@ -3269,6 +3269,7 @@ proc seq2GSList*[T](s: seq[T]): ptr glib.SList = #include gimplgobj include gimplglib +export glib.g_strdup """