Commit 4fa20461 authored by Evan Nemerson's avatar Evan Nemerson
Browse files

girparser: add cname for constructors not prefixed with new_

parent a250b463
......@@ -2795,6 +2795,10 @@ public class Vala.GirParser : CodeVisitor {
var m = new CreationMethod (null, name, current.source_reference);
m.has_construct_function = false;
if (name != null && !current.name.has_prefix ("new_")) {
m.set_attribute_string ("CCode", "cname", current.girdata["c:identifier"]);
}
string parent_ctype = null;
if (current.parent.symbol is Class) {
parent_ctype = current.parent.get_cname ();
......
......@@ -6087,7 +6087,7 @@ namespace Clutter {
public class ListModel : Clutter.Model, Clutter.Scriptable {
[CCode (has_construct_function = false, type = "ClutterModel*")]
public ListModel (uint n_columns, ...);
[CCode (has_construct_function = false, type = "ClutterModel*")]
[CCode (cname = "clutter_list_model_newv", has_construct_function = false, type = "ClutterModel*")]
public ListModel.newv ([CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] GLib.Type[] types, [CCode (array_length_cname = "n_columns", array_length_pos = 0.5, array_length_type = "guint")] string[] names);
}
[CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_margin_get_type ()")]
......
......@@ -52,7 +52,7 @@ namespace Peas {
public virtual bool call (string method_name, GI.Argument args);
public void @foreach (Peas.ExtensionSetForeachFunc func);
public unowned Peas.Extension get_extension (Peas.PluginInfo info);
[CCode (has_construct_function = false)]
[CCode (cname = "peas_extension_set_newv", has_construct_function = false)]
public ExtensionSet.newv (Peas.Engine? engine, GLib.Type exten_type, [CCode (array_length_cname = "n_parameters", array_length_pos = 2.5, array_length_type = "guint")] GLib.Parameter[] parameters);
public void* construct_properties { construct; }
[NoAccessorMethod]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment