Skip to content

Script to generate the Markdown table of C function to Pharo selector

Martín Dias edited this page Apr 18, 2025 · 1 revision

This was the script used to generate this Wiki page:

"
Metacello new
	baseline: 'FFICallBrowser';
	repository: 'github://tinchodias/FFICallBrowser';
	load.
"	
analysis := FFICallAnalyzer new
	methodSelectionBlock: [ :aFFICall |
		(aFFICall functionName beginsWith: 'SDL_') and: [
		(aFFICall functionName endsWith: '_dispose') not and: [
		aFFICall method package name beginsWith: 'SDL3'] ] ];
	run;
	newAnalysis.
	
analysis sortByFunctionName.

writeStream := '' writeStream.

analysis ffiCalls do: [ :each |
	writeStream << '| `'.
	writeStream << each functionName.
	writeStream << '` | `#'.
	writeStream << each method selector.
	writeStream << '` |'; lf.
 ].

writeStream contents.

Clone this wiki locally