Fun 0.41.5
The programming language that makes you have fun!
Loading...
Searching...
No Matches
release.c File Reference

Implements the OP_PCSC_RELEASE opcode (conditional build). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 free_value (vid)
 if (!e)
 SCardReleaseContext (e->ctx)
 push_value (vm, make_int(1))

Variables

case OP_PCSC_RELEASE
int id = (int)vid.i
pcsc_ctx_entrye = pcsc_get_ctx(id)
e in_use = 0
e ctx = 0
 break

Detailed Description

Implements the OP_PCSC_RELEASE opcode (conditional build).

Releases a previously established PC/SC context and frees its registry slot. When PCSC support is disabled at build time, this opcode returns 0 after consuming its argument.

OP_PCSC_RELEASE: (ctx_id:int) -> int

  • Pops: ctx_id.
  • Pushes: 1 on success; 0 on error (invalid id/not found) or when disabled.

Definition in file release.c.

Function Documentation

◆ free_value()

free_value ( vid )

◆ if()

if ( ! e)

Definition at line 31 of file release.c.

◆ push_value()

push_value ( vm ,
make_int(1)  )

◆ SCardReleaseContext()

SCardReleaseContext ( e-> ctx)

Variable Documentation

◆ break

break

Definition at line 44 of file release.c.

◆ ctx

e ctx = 0

Definition at line 37 of file release.c.

◆ e

Definition at line 30 of file release.c.

◆ id

int id = (int)vid.i

Definition at line 28 of file release.c.

◆ in_use

e in_use = 0

Definition at line 36 of file release.c.

◆ OP_PCSC_RELEASE

case OP_PCSC_RELEASE

Definition at line 25 of file release.c.