search for: gint32

Displaying 20 results from an estimated 34 matches for "gint32".

Did you mean: uint32
2012 Jan 12
1
Libguestfs gobject bindings
I'm currently working on gobject bindings for libguestfs. I haven't got as far as compiling anything yet, but I've attached the C header for initial review. Matt -- Matthew Booth, RHCA, RHCSS Red Hat Engineering, Virtualisation Team GPG ID: D33C3490 GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
2007 Aug 17
0
2 commits - libswfdec/swfdec_as_array.c test/trace
...as_native_function.h" #include "swfdec_as_strings.h" #include "swfdec_debug.h" +#include "swfdec_player_internal.h" G_DEFINE_TYPE (SwfdecAsArray, swfdec_as_array, SWFDEC_TYPE_AS_OBJECT) @@ -73,7 +74,7 @@ swfdec_as_array_to_index (const char *st } static gint32 -swfdec_as_array_get_length (SwfdecAsObject *object) +swfdec_as_array_get_length_as_integer (SwfdecAsObject *object) { SwfdecAsValue val; gint32 length; @@ -83,6 +84,16 @@ swfdec_as_array_get_length (SwfdecAsObje swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &val); l...
2007 Aug 17
0
Branch 'vivi' - 9 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_native_function.c
...as_native_function.h" #include "swfdec_as_strings.h" #include "swfdec_debug.h" +#include "swfdec_player_internal.h" G_DEFINE_TYPE (SwfdecAsArray, swfdec_as_array, SWFDEC_TYPE_AS_OBJECT) @@ -73,7 +74,7 @@ swfdec_as_array_to_index (const char *st } static gint32 -swfdec_as_array_get_length (SwfdecAsObject *object) +swfdec_as_array_get_length_as_integer (SwfdecAsObject *object) { SwfdecAsValue val; gint32 length; @@ -83,6 +84,16 @@ swfdec_as_array_get_length (SwfdecAsObje swfdec_as_object_get_variable (object, SWFDEC_AS_STR_length, &val); l...
2007 Jul 21
0
12 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/jpeg libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h
...ndex cc03b03..f6314a7 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -109,13 +109,13 @@ static gboolean swfdec_as_array_foreach_ const char *variable, SwfdecAsValue *value, guint flags, gpointer data) { ForeachRemoveRangeData *fdata = data; - gint32 index; + gint32 idx; - index = swfdec_as_array_to_index (variable); - if (index == -1) + idx = swfdec_as_array_to_index (variable); + if (idx == -1) return FALSE; - if (index >= fdata->start_index && index < fdata->start_index + fdata->num) + if (idx >= fda...
2007 Nov 14
0
2 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c libswfdec/swfdec_color_as.c libswfdec/swfdec_initialize.as
...) { + if (object == NULL) + return; + // if 0 args, just return the length // manually set the length here to make the function work on non-Arrays if (argc > 0) { @@ -650,6 +659,9 @@ swfdec_as_array_do_pop (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, gint32 length; const char *var; + if (object == NULL) + return; + // we allow negative indexes here, but not 0 length = swfdec_as_array_length_as_integer (object); if (length == 0) @@ -674,6 +686,9 @@ swfdec_as_array_do_unshift (SwfdecAsContext *cx, SwfdecAsObject *object, {...
2008 Jan 15
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_types.c test/trace
...*object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { - if (object == NULL) + if (object == NULL || SWFDEC_IS_MOVIE (object)) return; // if 0 args, just return the length @@ -659,7 +660,7 @@ swfdec_as_array_do_pop (SwfdecAsContext *cx, SwfdecAsObject *object, gint32 length; const char *var; - if (object == NULL) + if (object == NULL || SWFDEC_IS_MOVIE (object)) return; // we allow negative indexes here, but not 0 @@ -686,7 +687,7 @@ swfdec_as_array_do_unshift (SwfdecAsContext *cx, SwfdecAsObject *object, { gint32 length; - if (o...
2008 Jan 07
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/swfdec_as_array.c libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_function.c libswfdec/swfdec_as_types.c libswfdec/swfdec_xml.c
..._string where appropriate diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index 61a62e9..f28170c 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -182,7 +182,7 @@ swfdec_as_array_remove_range (SwfdecAsArray *array, gint32 start_index, // to avoid foreach loop, use special case when removing just one variable if (num == 1) { swfdec_as_object_delete_variable (object, - swfdec_as_double_to_string (object->context, start_index)); + swfdec_as_integer_to_string (object->context, start_index));...
2007 Oct 15
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_codec_audio.h test/swfdec-extract.c
...buffer_new_and_alloc (buffer->length + 44); unsigned char *data; guint i; data = wav->data; + /* FIXME: too much magic in this memmove */ memmove (data, "RIFF----WAVEfmt \020\0\0\0" - "\001\0\002\0D\254\0\0\020\261\002\0\004\0\020\0data", 40); - *(gint32 *) &data[4] = GUINT32_TO_LE (buffer->length + 36); - *(gint32 *) &data[40] = GUINT32_TO_LE (buffer->length); + "\001\0ccRRRRbbbbAAbbdata", 40); + *(guint32 *) &data[4] = GUINT32_TO_LE (buffer->length + 36); + *(guint16 *) &data[22] = GUINT16_TO_LE (swfdec_aud...
2012 Jan 20
2
GObject bindings overview
...t where language bindings allow. The value returned by RBufferOut is not copied. Structs: ******** A parallel struct is created for each libguestfs struct type. A boxed type is created for each parallel struct. It's field types are all mapped trivially to gobject basic types (e.g. gchar *, gint32) except FBuffer. FBuffer is mapped as: guint8 *<field> guint32 <field>_size Unfortunately I can see no way to attach annotation to these fields, so the bindings do not appreciate that these fields are related. I'm not happy with this at all, so I may try manual tweaking of...
2007 Sep 04
0
4 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_video_movie_as.c test/trace
...t are bigger than the length. diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index ff446d8..30cf22a 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -549,7 +549,7 @@ swfdec_as_array_foreach_reverse (SwfdecA gint32 idx; idx = swfdec_as_array_to_index (variable); - if (idx == -1) + if (idx == -1 || idx >= *length) return variable; return swfdec_as_double_to_string (object->context, *length - 1 - idx); @@ -761,7 +761,7 @@ swfdec_as_array_foreach_sort_rename (Swf gboolean after_undefine...
2007 Jul 11
0
libswfdec/swfdec_bits.c
...t... diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c index c8a5062..8ec6936 100644 --- a/libswfdec/swfdec_bits.c +++ b/libswfdec/swfdec_bits.c @@ -307,11 +307,9 @@ swfdec_bits_get_float (SwfdecBits * b) SWFDEC_BYTES_CHECK (b, 4); - conv.i = *((gint32 *) b->ptr); + conv.i = (b->ptr[3] << 24) | (b->ptr[2] << 16) | (b->ptr[1] << 8) | b->ptr[0]; b->ptr += 4; - conv.i = GINT32_FROM_LE (conv.i); - return conv.f; } @@ -323,40 +321,30 @@ swfdec_bits_get_float (SwfdecBits * b) * use this command line:...
2007 Sep 02
0
libswfdec/swfdec_as_array.c libswfdec/swfdec_as_string.c
...rray_sort (SwfdecAsContext *c ForeachSortData fdata; guint pos; + if (!SWFDEC_IS_AS_ARRAY (object)) { + SWFDEC_FIXME ("Array.sort should work on non-array objects too"); + return; + } + fdata.length = swfdec_as_array_get_length (object); fdata.order_size = MIN ((gint32)g_hash_table_size (object->properties) + 1, fdata.length + 1); diff --git a/libswfdec/swfdec_as_string.c b/libswfdec/swfdec_as_string.c index 5988369..cce29bf 100644 --- a/libswfdec/swfdec_as_string.c +++ b/libswfdec/swfdec_as_string.c @@ -99,6 +99,9 @@ swfdec_as_...
2007 Jul 11
0
Branch 'as' - 3 commits - libswfdec/swfdec_bits.c
...t... diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c index c8a5062..8ec6936 100644 --- a/libswfdec/swfdec_bits.c +++ b/libswfdec/swfdec_bits.c @@ -307,11 +307,9 @@ swfdec_bits_get_float (SwfdecBits * b) SWFDEC_BYTES_CHECK (b, 4); - conv.i = *((gint32 *) b->ptr); + conv.i = (b->ptr[3] << 24) | (b->ptr[2] << 16) | (b->ptr[1] << 8) | b->ptr[0]; b->ptr += 4; - conv.i = GINT32_FROM_LE (conv.i); - return conv.f; } @@ -323,40 +321,30 @@ swfdec_bits_get_float (SwfdecBits * b) * use this command line:...
2012 Jan 17
4
GObject bindings
This is the first iteration of the GObject bindings. I have 'kicked the tyres' on these, meaning I have ensured that a bunch of basic manual tests work as expected. I'm in the process of adding more comprehensive tests. Here's an example simple javascript program which uses these bindings: === const Guestfs = imports.gi.Guestfs; print('Starting'); var g = new
2012 Mar 28
2
[PATCH] Split gobject sources into 1 file per class
This patch replaces patches 14 and 15 from my previous series. The gtk-doc output is now reasonable, and we can rely on an automatically generated guestfs-sections.txt. Matt
2007 Nov 01
0
5 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie.c test/image
...> 2 ? argc - 2 : 0); object_new = swfdec_as_array_new (cx); + if (object_new == NULL) + return; array_new = SWFDEC_AS_ARRAY (object_new); swfdec_as_array_append_array_range (array_new, object, start_index, @@ -1228,11 +1234,13 @@ swfdec_as_array_do_sort (SwfdecAsObject *object, gint32 options, if (fdata.options & ARRAY_SORT_OPTION_RETURNINDEXEDARRAY) { // make a new array and fill it with numbers based on the order fdata.object_new = swfdec_as_array_new (object->context); - swfdec_as_object_foreach (object, swfdec_as_array_foreach_sort_indexedarray...
2012 Jan 20
17
[PATCH 01/10] Revert "Revert "generator: Add CamelName flag""
This reverts commit 3f6ca541c7b24d4c86688a509582cb41a7e0078c. The original commit was reverted prematurely. --- generator/generator_actions.ml | 10 +++++----- generator/generator_checks.ml | 5 +++++ generator/generator_types.ml | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/generator/generator_actions.ml
2007 Nov 15
0
4 commits - libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c test/trace
...n setting arguments.caller diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c index ed531a7..3c6cde5 100644 --- a/libswfdec/swfdec_as_array.c +++ b/libswfdec/swfdec_as_array.c @@ -1228,9 +1228,6 @@ swfdec_as_array_do_sort (SwfdecAsObject *object, gint32 options, fdata.compare_custom_func = custom_compare_func; fdata.fields = fields; - // don't mark this function as the caller of custom sort function - object->context->frame->caller = FALSE; - // generate fdata.order which points to the values if (!swfde...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...pret.c @@ -981,23 +981,22 @@ swfdec_action_push_duplicate (SwfdecAsCo *swfdec_as_stack_push (cx->frame->stack) = *swfdec_as_stack_peek (cx->frame->stack, 1); } -#if 0 static void swfdec_action_random_number (SwfdecAsContext *cx, guint action, const guint8 *data, guint len) { - gint32 max, result; + gint32 max; + SwfdecAsValue *val; - if (!JS_ValueToECMAInt32 (cx, cx->fp->sp[-1], &max)) - return JS_FALSE; + val = swfdec_as_stack_peek (cx->frame->stack, 1); + max = swfdec_as_value_to_integer (cx, val); if (max <= 0) - result = 0; + SWFDEC...
2007 Jun 01
0
Branch 'as' - 2 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_interval.c libswfdec/swfdec_interval.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c
...cx); const char *bytes; @@ -204,7 +116,7 @@ swfdec_js_trace (SwfdecAsObject *obj, ui } static void -swfdec_js_random (SwfdecAsObject *obj, uintN argc, SwfdecAsValue *argv, SwfdecAsValue *rval) +swfdec_js_random (SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) { gint32 max, result; @@ -220,7 +132,7 @@ swfdec_js_random (SwfdecAsObject *obj, u } static void -swfdec_js_stopAllSounds (SwfdecAsObject *obj, uintN argc, SwfdecAsValue *argv, SwfdecAsValue *rval) +swfdec_js_stopAllSounds (SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval) {...