~ubuntu-branches/ubuntu/jaunty/swfdec0.8/jaunty

« back to all changes in this revision

Viewing changes to vivified/code/vivi_code_builtin_statement_default.c

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2008-10-10 19:15:24 UTC
  • Revision ID: package-import@ubuntu.com-20081010191524-5z85qiky1d4bvgfa
Tags: upstream-0.8.0
ImportĀ upstreamĀ versionĀ 0.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Vivified
 
2
 * Copyright (C) 2008 Benjamin Otte <otte@gnome.org>
 
3
 *               2008 Pekka Lampila <pekka.lampila@iki.fi>
 
4
 *
 
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.
 
14
 * 
 
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
 
19
 */
 
20
 
 
21
#ifdef HAVE_CONFIG_H
 
22
#include "config.h"
 
23
#endif
 
24
 
 
25
#include "vivi_code_builtin_statement_default.h"
 
26
#include "vivi_code_asm_code_default.h"
 
27
 
 
28
#define DEFAULT_BUILTIN_STATEMENT(CapsName, underscore_name, name) \
 
29
\
 
30
G_DEFINE_TYPE (ViviCode ## CapsName, vivi_code_ ## underscore_name, VIVI_TYPE_CODE_BUILTIN_STATEMENT) \
 
31
\
 
32
static void \
 
33
vivi_code_ ## underscore_name ## _class_init (ViviCodeBuiltinStatementClass *klass) \
 
34
{ \
 
35
  ViviCodeBuiltinStatementClass *builtin_class = VIVI_CODE_BUILTIN_STATEMENT_CLASS (klass); \
 
36
\
 
37
  builtin_class->function_name = name; \
 
38
  builtin_class->asm_constructor = vivi_code_asm_ ## underscore_name ## _new; \
 
39
} \
 
40
\
 
41
static void \
 
42
vivi_code_ ## underscore_name ## _init (ViviCodeBuiltinStatement *builtin_statement) \
 
43
{ \
 
44
} \
 
45
\
 
46
ViviCodeStatement * \
 
47
vivi_code_ ## underscore_name ## _new (void) \
 
48
{ \
 
49
  return VIVI_CODE_STATEMENT ( \
 
50
      g_object_new (vivi_code_ ## underscore_name ## _get_type (), NULL)); \
 
51
}
 
52
 
 
53
#include "vivi_code_defaults.h"