File: ref.liq

package info (click to toggle)
liquidsoap 2.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 12,924 kB
  • sloc: ml: 73,577; javascript: 24,836; sh: 3,440; makefile: 764; xml: 114; ansic: 96; lisp: 62; python: 35; perl: 8; ruby: 8
file content (11 lines) | stat: -rw-r--r-- 212 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
# Create a getter from a reference.
# @category Liquidsoap
def ref.getter(r) =
  {!r}.{set = fun(v) -> r := v}
end

# Increment a reference to an integer.
# @category Liquidsoap
def ref.incr(r)
  r := !r + 1
end