nitdoc: remove unused plugin "Copy to Clipboard"
[nit.git] / tests / test_ni_new.nit.c
1 /* This file is part of NIT ( http://www.nitlanguage.org ).
2 *
3 * Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
4 *
5 * This file is free software, which comes along with NIT. This software is
6 * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
8 * PARTICULAR PURPOSE. You can modify it is you want, provided this header
9 * is kept unaltered, and a notification of the changes is added.
10 * You are allowed to redistribute it and sell it, alone or is a part of
11 * another product.
12 */
13
14 #include "test_ni_new.nit.h"
15
16 #include <stdlib.h>
17
18
19 /*
20 C implementation of extern_new::A::init
21
22 Imported methods signatures:
23 void A_p( A recv ) for extern_new::A::p
24 */
25 int dv = 1234;
26 A new_A___impl( )
27 {
28 return &dv;
29 }
30
31 /*
32 C implementation of extern_new::A::with_args
33 */
34 A new_A_with_args___impl( bigint x, A a )
35 {
36 int* v = (int*)malloc( sizeof(int) );
37 (*v) = (int)x;
38 return v;
39 }
40
41 /*
42 C implementation of extern_new::A::p
43 */
44 void A_p___impl( A recv )
45 {
46 printf( "allo from %i\n", *recv );
47 }
48
49 /*
50 C implementation of extern_new::A::d
51
52 Imported methods signatures:
53 A A_d( A recv ) for extern_new::A::d
54 A new_A( ) for extern_new::A::init
55 */
56 A A_d___impl( A recv )
57 {
58 return new_A();
59 }