~ubuntu-branches/ubuntu/wily/lua-lgi/wily

« back to all changes in this revision

Viewing changes to lgi/override/GObject-Value.lua

  • Committer: Package Import Robot
  • Author(s): Enrico Tassi
  • Date: 2015-08-14 21:07:46 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20150814210746-w1i1de8zufeiimxp
Tags: 0.9.0-1
* remove pre-depend on multiarch-support
* new upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
 
85
85
local value_marshallers = {}
86
86
for name, gtype in pairs(Type) do
87
 
   local get = Value['get_' .. name:lower()]
88
 
   local set = Value['set_' .. name:lower()]
 
87
   name = core.downcase(name)
 
88
   local get = Value['get_' .. name]
 
89
   local set = Value['set_' .. name]
89
90
   if get and set then
90
91
      value_marshallers[gtype] =
91
92
      function(value, params, ...)
112
113
-- Override marshallers for enums and bitmaps, marshal them as strings
113
114
-- or sets of string flags.
114
115
for name, gtype in pairs { ENUM = Type.ENUM, FLAGS = Type.FLAGS } do
115
 
   local get = Value._method['get_' .. name:lower()]
116
 
   local set = Value._method['set_' .. name:lower()]
 
116
   name = core.downcase(name)
 
117
   local get = Value._method['get_' .. name]
 
118
   local set = Value._method['set_' .. name]
117
119
   value_marshallers[gtype] = function(value, params, ...)
118
120
      local rtype
119
121
      if select('#', ...) > 0 then