grim/purple-spasm

00f5f3a80952
Parents c429341372c6
Children 2f0bf9786463
Use named initializers when creating our plugin info struct
  • +16 -30
    helloworld.c
  • --- a/helloworld.c Mon Apr 24 21:23:11 2017 -0500
    +++ b/helloworld.c Mon Apr 24 22:14:43 2017 -0500
    @@ -18,40 +18,26 @@
    }
    static PurplePluginInfo info = {
    - PURPLE_PLUGIN_MAGIC,
    - PURPLE_MAJOR_VERSION,
    - PURPLE_MINOR_VERSION,
    - PURPLE_PLUGIN_STANDARD,
    - NULL,
    - 0,
    - NULL,
    - PURPLE_PRIORITY_DEFAULT,
    -
    - "core-hello_world",
    - "Hello World!",
    - "1.1",
    + .magic = PURPLE_PLUGIN_MAGIC,
    + .major_version = PURPLE_MAJOR_VERSION,
    + .minor_version = PURPLE_MINOR_VERSION,
    + .type = PURPLE_PLUGIN_STANDARD,
    + .priority = PURPLE_PRIORITY_DEFAULT,
    - "Hello World Plugin",
    - "Hello World Plugin",
    - "My Name <email@helloworld.tld>",
    - "http://helloworld.tld",
    + .id = "core-hello_world",
    + .name = "Hello World!",
    + .version = "1.1",
    +
    + .summary = "Hello World Plugin",
    + .description = "Hello World Plugin",
    + .author = "My Name <email@helloworld.tld>",
    + .homepage = "http://helloworld.tld",
    - plugin_load,
    - NULL,
    - NULL,
    -
    - NULL,
    - NULL,
    - NULL,
    - NULL,
    - NULL,
    - NULL,
    - NULL,
    - NULL
    -};
    + .load = plugin_load
    +};
    static void
    init_plugin(PurplePlugin *plugin) {
    }
    -PURPLE_INIT_PLUGIN(hello_world, init_plugin, info)
    \ No newline at end of file
    +PURPLE_INIT_PLUGIN(hello_world, init_plugin, info);