Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lgi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ lgi_type_get_name (lua_State *L, GIBaseInfo *info)
{
if (g_base_info_get_type (i->data) != GI_INFO_TYPE_TYPE)
{
lua_pushstring (L, ".");
lua_pushliteral (L, ".");
lua_pushstring (L, g_base_info_get_name (i->data));
n += 2;
}
Expand Down Expand Up @@ -228,7 +228,7 @@ lgi_type_get_gtype (lua_State *L, int narg)
{
GType gtype;
lgi_makeabs (L, narg);
lua_pushstring (L, "_gtype");
lua_pushliteral (L, "_gtype");
lua_rawget (L, narg);
gtype = lgi_type_get_gtype (L, -1);
lua_pop (L, 1);
Expand Down
25 changes: 17 additions & 8 deletions lgi/gi.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ info_push_transfer (lua_State *L, GITransfer transfer)
#define H(n1, n2) \
else if (transfer == GI_TRANSFER_ ## n1) \
{ \
lua_pushstring (L, #n2); \
lua_pushliteral (L, #n2); \
return 1; \
}
H(NOTHING, none)
Expand Down Expand Up @@ -177,7 +177,7 @@ info_index (lua_State *L)
{
#define H(n1, n2) \
case GI_INFO_TYPE_ ## n1: \
lua_pushstring (L, #n2); \
lua_pushliteral (L, #n2); \
return 1;

H(FUNCTION, function)
Expand Down Expand Up @@ -435,11 +435,20 @@ info_index (lua_State *L)
if (strcmp (prop, "direction") == 0)
{
GIDirection dir = g_arg_info_get_direction (*info);
if (dir == GI_DIRECTION_OUT)
lua_pushstring (L, g_arg_info_is_caller_allocates (*info)
? "out-caller-alloc" : "out");
else
lua_pushstring (L, dir == GI_DIRECTION_IN ? "in" : "inout");
switch (dir) {
case GI_DIRECTION_IN:
lua_pushliteral(L, "in");
break;
case GI_DIRECTION_OUT:
if (g_arg_info_is_caller_allocates(*info))
lua_pushliteral(L, "out-caller-alloc");
else
lua_pushliteral(L, "out");
break;
case GI_DIRECTION_INOUT:
lua_pushliteral(L, "inout");
break;
}
return 1;
}
if (strcmp (prop, "transfer") == 0)
Expand Down Expand Up @@ -536,7 +545,7 @@ info_index (lua_State *L)
{
#define H(n1, n2) \
case GI_ARRAY_TYPE_ ## n1: \
lua_pushstring (L, #n2); \
lua_pushliteral (L, #n2); \
return 1;

H(C, c)
Expand Down