libseed-list char** <--> arrays



Hi, folks.

In vinagre, I have a virtual function like this:
/**
 * vinagre_protocol_get_public_description:
 * @protocol: A protocol
 *
 * Return value: (array zero-terminated=1) (element-type utf8) (transfer
full):
 */
gchar **
vinagre_protocol_get_public_description (VinagreProtocol *protocol)
{...}

It's up to the plugins to implement this function. In C everything is
OK.

About javascript... I'm doing the following:
...
  get_public_description: function () {
    return new Array ("Telnet", _("Access old UNIX machines"));
  },
...

The doubt is: How to convert a javascript array into a C array
zero-terminated? We don't have a seed_value_to_array()...

Thanks,
-- 
Jonh Wendell
http://www.bani.com.br



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]