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(
893893 !in_import,
894894 renamed_interfaces,
895895 ) ) ,
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+ }
897902 }
898903 name. push_str ( "_" ) ;
899904 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 33#include <stdlib.h>
44#include <string.h>
55
6- void flavorful_test_imports () {
6+ void exports_flavorful_test_imports () {
77 {
88 test_flavorful_test_list_in_record1_t a ;
99 flavorful_string_set (& a .a , "list_in_record1" );
Original file line number Diff line number Diff line change 77#include <stdlib.h>
88#include <string.h>
99
10- uint32_t lists_allocated_bytes (void ) {
10+ uint32_t exports_lists_allocated_bytes (void ) {
1111 return 0 ;
1212}
1313
14- void lists_test_imports () {
14+ void exports_lists_test_imports () {
1515 {
1616 uint8_t list [] = {};
1717 lists_list_u8_t a ;
Original file line number Diff line number Diff line change 33#include <limits.h>
44#include <math.h>
55
6- void many_arguments_many_arguments (
6+ void exports_many_arguments_many_arguments (
77 uint64_t a1 ,
88 uint64_t a2 ,
99 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) {
5858}
5959
6060
61- void numbers_test_imports () {
61+ void exports_numbers_test_imports () {
6262 assert (test_numbers_test_roundtrip_u8 (1 ) == 1 );
6363 assert (test_numbers_test_roundtrip_u8 (0 ) == 0 );
6464 assert (test_numbers_test_roundtrip_u8 (UCHAR_MAX ) == UCHAR_MAX );
Original file line number Diff line number Diff line change 11#include <assert.h>
22#include <records.h>
33
4- void records_test_imports () {
4+ void exports_records_test_imports () {
55 {
66 records_tuple2_u8_u16_t ret ;
77 test_records_test_multiple_results (& ret );
Original file line number Diff line number Diff line change 11#include <assert.h>
22#include <resource_borrow_simple.h>
33
4- void resource_borrow_simple_test_imports (void ) {
4+ void exports_resource_borrow_simple_test_imports (void ) {
55 resource_borrow_simple_own_r_t r = resource_borrow_simple_constructor_r ();
66 resource_borrow_simple_borrow_r_t b = resource_borrow_simple_borrow_r (r );
77 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 {
1212};
1313
1414resource_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 ) {
1616 return resource_import_and_export_toplevel_import (a );
1717}
1818
Original file line number Diff line number Diff line change 11#include <smoke.h>
22#include <stdio.h>
33
4- void smoke_thunk () {
4+ void exports_smoke_thunk () {
55 test_smoke_imports_thunk ();
66
77 printf ("howdy\n" );
You can’t perform that action at this time.
0 commit comments