Skip to content

Instantly share code, notes, and snippets.

@zah
Created November 12, 2011 13:54
Show Gist options
  • Select an option

  • Save zah/1360544 to your computer and use it in GitHub Desktop.

Select an option

Save zah/1360544 to your computer and use it in GitHub Desktop.
template openFile: expr =
var x: File
type `%dummy` = object
f: File
var `%d` = `%dummy`(x)
proc destroy(x: `%dummy`) =
callAtExitCode x.f
x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment