mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	Add windows FFI example test case for void functions with double
argument.
This commit is contained in:
		| @@ -124,6 +124,10 @@ void void_fn(void) { | ||||
|     printf("void fn ran\n"); | ||||
| } | ||||
|  | ||||
| EXPORTER void_fn_2(double y) { | ||||
|     printf("y = %f\n", y); | ||||
| } | ||||
|  | ||||
| EXPORTER | ||||
| void void_ret_fn(int x) { | ||||
|     printf("void fn ran: %d\n", x); | ||||
|   | ||||
| @@ -43,6 +43,7 @@ | ||||
|    h :double | ||||
|    i :double | ||||
|    j :double]) | ||||
| (ffi/defbind void-fn-2 :void [y :double]) | ||||
|  | ||||
| # | ||||
| # Struct reading and writing | ||||
| @@ -84,6 +85,7 @@ | ||||
| # Call functions | ||||
| # | ||||
|  | ||||
| (tracev (void-fn-2 10.3)) | ||||
| (tracev (double-many 1 2 3 4 5 6)) | ||||
| (tracev (string/format "%.17g" (double-many 1 2 3 4 5 6))) | ||||
| (tracev (type (double-many 1 2 3 4 5 6))) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bakpakin
					bakpakin