Serene Runtime 1.0.0
C runtime for the Serene programming language
Loading...
Searching...
No Matches
srn_namespace_src_buffer_t Struct Reference

#include <namespaces.h>

Data Fields

char * path
 Path on disk this buffer is associated with.
 
uint8_t * bytes
 Byte storage.
 
size_t len
 
size_t cap
 

Detailed Description

Definition at line 31 of file namespaces.h.

Field Documentation

◆ bytes

uint8_t* srn_namespace_src_buffer_t::bytes

Byte storage.

bytes[0..len] is the live content. bytes[len..cap] is unused capacity. Allocated through the engine's memory manager and freed on shutdown.

Definition at line 43 of file namespaces.h.

◆ cap

size_t srn_namespace_src_buffer_t::cap

Definition at line 45 of file namespaces.h.

◆ len

size_t srn_namespace_src_buffer_t::len

Definition at line 44 of file namespaces.h.

◆ path

char* srn_namespace_src_buffer_t::path

Path on disk this buffer is associated with.

When not null, srn_src_reload re-reads from here. A null value means the buffer has no associated file, for example a fresh REPL session that has not loaded one. A buffer can acquire a path later by being assigned one, or lose its connection by being passed to a future detach helper. Owned by the buffer and freed on shutdown.

Definition at line 38 of file namespaces.h.


The documentation for this struct was generated from the following file: