ni_nitdoc: added fast copy past utility to signatures.
[nit.git] / tests / test_ni_casts.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_casts.nit.h"
15
16 /*
17 C implementation of test_ni_casts::Object::a
18
19 Imported methods signatures:
20 int String_is_a_Object( String value ) to check if a String is a Object
21 Object String_as_Object( String value ) to cast from String to Object
22 */
23 Object Object_a___impl( Object recv, String s )
24 {
25 return String_as_Object( s );
26 }
27
28 /*
29 C implementation of test_ni_casts::Object::b
30
31 Imported methods signatures:
32 nullable_String String_as_nullable( String value ) to cast from String to nullable String
33 */
34 nullable_String Object_b___impl( Object recv, String s )
35 {
36 return String_as_nullable( s );
37 }
38
39 /*
40 C implementation of test_ni_casts::Object::c
41
42 Imported methods signatures:
43 int nullable_String_is_null( nullable_String value ) to check if a nullable String is a String
44 String nullable_String_as_not_null( nullable_String value ) to cast from nullable String to String
45 */
46 String Object_c___impl( Object recv, nullable_String s )
47 {
48 return nullable_String_as_not_null( s );
49 }