Hi all, In Efl.Net I've created couple of "constructors" functions to help the user with common tasks, such as:
src/lib/ecore_con/efl_net_ip_address.eo: - create(port, address) - create_sockaddr(sockaddr) - parse(string) - resolve(string, family, flags) (returns a promise) In many languages that's easy to use: efl.net.ip_address.create(1234, "127.0.0.1") But in C it's a bitch: efl_net_ip_address_create(EFL_NET_IP_ADDRESS_CLASS, 1234, "127.0.0.1"); While these are nice to be "class methods" since one could get these to work with subclasses, they are often used with the original class. Then my request is to either to introduce a "staticmethod" OR to use some macro trick to count the number of parameters and pass the class automatically when omitted or generate 2 functions, one with class and another without (one could be an actual function, while the other just a macro). End goal is to make these look more like: efl_net_ip_address_create(1234, "127.0.0.1"); -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel