[Swfdec] [Swfdec-commits] 15 commits - doc/swfdec.types swfdec/Makefile.am swfdec/swfdec_amf.c swfdec/swfdec_as_array.c swfdec/swfdec_as_array.h swfdec/swfdec_as_boolean.c swfdec/swfdec_as_boolean.h swfdec/swfdec_as_context.c swfdec/swfdec_as_context.h sw

zou lunkai zoulunkai at gmail.com
Wed Oct 29 19:09:16 PDT 2008


seems I cann't reply to the commit mail list directly, so forward to
the develop mail list. see message bellow.

--zou


On Thu, Oct 30, 2008 at 9:59 AM, zou lunkai <zoulunkai at gmail.com> wrote:
>> +/**
>> + * swfdec_as_value_set_number:
>> + * @context: The context to use
>> + * @val: value to set
>> + * @number: double value to set
>> + *
>> + * Sets @val to the given value. If you are sure the value is a valid
>> + * integer value, use wfdec_as_value_set_int() instead.
>> + */
>> +void
>> +swfdec_as_value_set_number (SwfdecAsContext *context, SwfdecAsValue *val,
>>+    double d)
>> +{
>> +  val->type = SWFDEC_AS_TYPE_NUMBER;
>> +  val->value.number = g_slice_new (SwfdecAsDoubleValue);
>> +  val->value.number->number = d;
>> +  val->value.number->next = context->numbers;
>> +  context->numbers = val->value.number;
>> +}
>> +
>
> In ActionScript, primitive numbers are not GC-collected or reference
> counted, aren't they?
>
> What's the good point to make primitive numbers to be heap allocated?
> Is it overkill?
>
> --zou
>
>


More information about the Swfdec mailing list