ni_nitdoc: added fast copy past utility to signatures.
[nit.git] / tests / test_ni_strings.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_strings.nit.h"
15
16
17 /*
18 C implementation of test_ni_strings::A::get_str_from_nstr
19
20 Imported methods signatures:
21 String new_String_from_cstring( char * str ) for string::String::from_cstring
22 */
23 String A_get_str_from_nstr___impl( A recv, char * nstr )
24 {
25 return new_String_from_cstring( nstr );
26 }
27
28 /*
29 C implementation of test_ni_strings::A::get_str_from_nstr_with_len
30
31 Imported methods signatures:
32 String new_String_with_native( char * nat, bigint size ) for string::String::with_native
33 bigint NativeString_cstring_length( char * recv ) for string::NativeString::cstring_length
34 */
35 String A_get_str_from_nstr_with_len___impl( A recv, char * nstr )
36 {
37 return new_String_with_native( nstr, NativeString_cstring_length( nstr ) );
38 }
39
40 /*
41 C implementation of test_ni_strings::A::get_nstr_from_str
42
43 Imported methods signatures:
44 char * String_to_cstring( String recv ) for string::String::to_cstring
45 */
46 char * A_get_nstr_from_str___impl( A recv, String str )
47 {
48 return String_to_cstring( str );
49 }
50
51
52 /*
53 C implementation of test_ni_strings::A::get_something
54
55 Imported methods signatures:
56 String new_String_from_cstring( char * str ) for string::String::from_cstring
57 */
58 String A_get_something___impl( A recv )
59 {
60 return new_String_from_cstring( "something" );
61 }