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

VM opcode snippet for loading an INI file (OP_INI_LOAD). More...

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

Go to the source code of this file.

Functions

 if (path)
 free_value (vpath)
 push_value (vm, make_int(h))

Variables

case OP_INI_LOAD
const char * path = (vpath.type == VAL_STRING && vpath.s) ? vpath.s : NULL
int h = 0
 break

Detailed Description

VM opcode snippet for loading an INI file (OP_INI_LOAD).

Opcode: OP_INI_LOAD Stack: [path:string] -> [handle:int]

Behavior

  • Pops a filesystem path and attempts to parse it via iniparser_load().
  • On success, registers the resulting dictionary and pushes a positive handle. On failure, pushes 0.

Notes

  • The returned handle must later be released with OP_INI_FREE to avoid leaking dictionary objects.

Definition in file load.c.

Function Documentation

◆ free_value()

free_value ( vpath )

◆ if()

if ( path )

Definition at line 33 of file load.c.

◆ push_value()

push_value ( vm ,
make_int(h)  )

Variable Documentation

◆ break

break

Definition at line 44 of file load.c.

◆ h

int h = 0

Definition at line 32 of file load.c.

◆ OP_INI_LOAD

case OP_INI_LOAD

Definition at line 29 of file load.c.

◆ path

const char* path = (vpath.type == VAL_STRING && vpath.s) ? vpath.s : NULL

Definition at line 31 of file load.c.