Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
pygobject
Commits
329afb6f
Commit
329afb6f
authored
Jan 18, 2011
by
John (J5) Palmieri
Browse files
[gi] fix handling of garrays vs c arrays
parent
f6605138
Changes
3
Show whitespace changes
Inline
Side-by-side
gi/pygi-argument.c
View file @
329afb6f
...
...
@@ -2635,8 +2635,13 @@ array_success:
state
->
in_args
[
aux_cache
->
c_arg_index
].
v_long
=
length
;
}
(
*
arg
).
v_pointer
=
array_
->
data
;
if
(
sequence_cache
->
array_type
==
GI_ARRAY_TYPE_C
)
{
arg
->
v_pointer
=
array_
->
data
;
g_array_free
(
array_
,
FALSE
);
}
else
{
arg
->
v_pointer
=
array_
;
}
return
TRUE
;
}
...
...
gi/pygi-cache.c
View file @
329afb6f
...
...
@@ -403,6 +403,8 @@ _arg_cache_new_for_in_array(PyGIFunctionCache *function_cache,
PyGISequenceCache
*
seq_cache
=
_sequence_cache_new_from_type_info
(
type_info
,
(
function_cache
->
is_method
?
1
:
0
));
PyGIArgCache
*
arg_cache
=
(
PyGIArgCache
*
)
seq_cache
;
seq_cache
->
array_type
=
g_type_info_get_array_type
(
type_info
);
if
(
seq_cache
->
len_arg_index
>=
0
)
{
PyGIArgCache
*
aux_cache
=
_arg_cache_new
();
aux_cache
->
aux_type
=
PYGI_AUX_TYPE_IGNORE
;
...
...
gi/pygi-cache.h
View file @
329afb6f
...
...
@@ -82,6 +82,7 @@ typedef struct _PyGISequenceCache
gint
len_arg_index
;
gboolean
is_zero_terminated
;
gsize
item_size
;
GIArrayType
array_type
;
PyGIArgCache
*
item_cache
;
}
PyGISequenceCache
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment