File tree Expand file tree Collapse file tree 12 files changed +25
-14
lines changed
resource_import_and_export Expand file tree Collapse file tree 12 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -893,7 +893,12 @@ pub fn c_func_name(
893
893
!in_import,
894
894
renamed_interfaces,
895
895
) ) ,
896
- None => name. push_str ( & world. to_snake_case ( ) ) ,
896
+ None => {
897
+ if !in_import {
898
+ name. push_str ( "exports_" ) ;
899
+ }
900
+ name. push_str ( & world. to_snake_case ( ) ) ;
901
+ }
897
902
}
898
903
name. push_str ( "_" ) ;
899
904
name. push_str ( & func. name . to_snake_case ( ) . replace ( '.' , "_" ) ) ;
Original file line number Diff line number Diff line change
1
+ package green : blue ;
2
+
3
+ world my-world {
4
+ import purple : func ();
5
+ export purple : func ();
6
+ }
Original file line number Diff line number Diff line change 3
3
#include <stdlib.h>
4
4
#include <string.h>
5
5
6
- void flavorful_test_imports () {
6
+ void exports_flavorful_test_imports () {
7
7
{
8
8
test_flavorful_test_list_in_record1_t a ;
9
9
flavorful_string_set (& a .a , "list_in_record1" );
Original file line number Diff line number Diff line change 7
7
#include <stdlib.h>
8
8
#include <string.h>
9
9
10
- uint32_t lists_allocated_bytes (void ) {
10
+ uint32_t exports_lists_allocated_bytes (void ) {
11
11
return 0 ;
12
12
}
13
13
14
- void lists_test_imports () {
14
+ void exports_lists_test_imports () {
15
15
{
16
16
uint8_t list [] = {};
17
17
lists_list_u8_t a ;
Original file line number Diff line number Diff line change 3
3
#include <limits.h>
4
4
#include <math.h>
5
5
6
- void many_arguments_many_arguments (
6
+ void exports_many_arguments_many_arguments (
7
7
uint64_t a1 ,
8
8
uint64_t a2 ,
9
9
uint64_t a3 ,
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ uint32_t exports_test_numbers_test_get_scalar(void) {
58
58
}
59
59
60
60
61
- void numbers_test_imports () {
61
+ void exports_numbers_test_imports () {
62
62
assert (test_numbers_test_roundtrip_u8 (1 ) == 1 );
63
63
assert (test_numbers_test_roundtrip_u8 (0 ) == 0 );
64
64
assert (test_numbers_test_roundtrip_u8 (UCHAR_MAX ) == UCHAR_MAX );
Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
2
#include <records.h>
3
3
4
- void records_test_imports () {
4
+ void exports_records_test_imports () {
5
5
{
6
6
records_tuple2_u8_u16_t ret ;
7
7
test_records_test_multiple_results (& ret );
Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
2
#include <resource_borrow_simple.h>
3
3
4
- void resource_borrow_simple_test_imports (void ) {
4
+ void exports_resource_borrow_simple_test_imports (void ) {
5
5
resource_borrow_simple_own_r_t r = resource_borrow_simple_constructor_r ();
6
6
resource_borrow_simple_borrow_r_t b = resource_borrow_simple_borrow_r (r );
7
7
resource_borrow_simple_test (b );
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ struct exports_test_resource_import_and_export_test_thing_t {
12
12
};
13
13
14
14
resource_import_and_export_own_thing_t
15
- resource_import_and_export_toplevel_export (resource_import_and_export_own_thing_t a ) {
15
+ exports_resource_import_and_export_toplevel_export (resource_import_and_export_own_thing_t a ) {
16
16
return resource_import_and_export_toplevel_import (a );
17
17
}
18
18
Original file line number Diff line number Diff line change 1
1
#include <smoke.h>
2
2
#include <stdio.h>
3
3
4
- void smoke_thunk () {
4
+ void exports_smoke_thunk () {
5
5
test_smoke_imports_thunk ();
6
6
7
7
printf ("howdy\n" );
You can’t perform that action at this time.
0 commit comments