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

« back to all changes in this revision

Viewing changes to lgi/object.c

  • 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:
275
275
  gpointer obj = object_get (L, 1);
276
276
  GType gtype = G_TYPE_FROM_INSTANCE (obj);
277
277
  lua_getfenv (L, 1);
278
 
  if (!lua_isnil (L, -1))
279
 
    lua_getfield (L, -1, "_name");
280
 
  else
 
278
  if (lua_isnil (L, -1))
281
279
    lua_pushliteral (L, "<??\?>");
 
280
  else
 
281
    {
 
282
      lua_getfield (L, -1, "_tostring");
 
283
      if (!lua_isnil (L, -1))
 
284
        {
 
285
          lua_pushvalue (L, 1);
 
286
          lua_call (L, 1, 1);
 
287
          return 1;
 
288
        }
 
289
      lua_getfield (L, -2, "_name");
 
290
    }
282
291
  lua_pushfstring (L, "lgi.obj %p:%s(%s)", obj, lua_tostring (L, -1),
283
292
                   g_type_name (gtype));
284
293
  return 1;