File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ void getAsMotorbike() {
117117 assertEquals ("Yamaha" , motorbike .arg0 ());
118118 assertEquals (750 , motorbike .horsePower ());
119119 assertEquals (OptionalInt .empty (), motorbike .helmets ());
120-
120+
121121 vehicle = Vehicle .motorbike ("Yamaha" , 750 , OptionalInt .of (2 ), arena );
122122 motorbike = vehicle .getAsMotorbike ().orElseThrow ();
123123 assertEquals (OptionalInt .of (2 ), motorbike .helmets ());
Original file line number Diff line number Diff line change @@ -98,6 +98,12 @@ extension JNISwift2JavaGenerator {
9898 }
9999 }
100100
101+ printer. println ( )
102+ printer. print ( #"@_cdecl("JNI_OnUnload")"# )
103+ printer. printBraceBlock ( " func JNI_OnUnload(javaVM: UnsafeMutablePointer<JavaVM?>!, reserved: UnsafeMutableRawPointer!) " ) { printer in
104+ printer. print ( " JNICaches.cleanup() " )
105+ }
106+
101107 let fileName = " \( self . swiftModuleName) +JNICaches.swift "
102108
103109 if let outputFile = try printer. writeContents (
You can’t perform that action at this time.
0 commit comments