Bug 22803 - Make header conform to implementation
[swfdec.git] / swfdec / swfdec_loadvars_as.c
blobb242a98cb9b58f405bcc78eefa58de99b9dff5e6
1 /* Swfdec
2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
3 * 2007 Pekka Lampila <pekka.lampila@iki.fi>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA
21 #ifdef HAVE_CONFIG_H
22 #include "config.h"
23 #endif
25 #include <string.h>
27 #include "swfdec_debug.h"
28 #include "swfdec_as_context.h"
29 #include "swfdec_as_internal.h"
30 #include "swfdec_as_object.h"
31 #include "swfdec_as_string.h"
32 #include "swfdec_as_strings.h"
33 #include "swfdec_as_types.h"
35 /*** AS CODE ***/
37 SWFDEC_AS_NATIVE (301, 3, swfdec_loadvars_decode)
38 void
39 swfdec_loadvars_decode (SwfdecAsContext *cx, SwfdecAsObject *obj,
40 guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
42 if (obj == NULL)
43 return;
45 if (argc < 1) {
46 SWFDEC_AS_VALUE_SET_BOOLEAN (rval, FALSE);
47 return;
50 swfdec_as_object_decode (obj, swfdec_as_value_to_string (cx, argv[0]));