OpenTTD Source 20260206-master-g4d4e37dbf1
squirrel.cpp File Reference

the implementation of the Squirrel class. More...

#include "../stdafx.h"
#include "../debug.h"
#include "squirrel_std.hpp"
#include "../error_func.h"
#include "../fileio_func.h"
#include "../string_func.h"
#include "script_fatalerror.hpp"
#include "../settings_type.h"
#include <sqstdaux.h>
#include <../squirrel/sqpcheader.h>
#include <../squirrel/sqvm.h>
#include "../core/math_func.hpp"
#include "../core/string_consumer.hpp"
#include "../safeguards.h"

Go to the source code of this file.

Data Structures

struct  ScriptAllocator
class  SQFile

Functions

void * sq_vm_malloc (SQUnsignedInteger size)
void * sq_vm_realloc (void *p, SQUnsignedInteger oldsize, SQUnsignedInteger size)
void sq_vm_free (void *p, SQUnsignedInteger size)
static char32_t _io_file_lexfeed_ASCII (SQUserPointer file)
static char32_t _io_file_lexfeed_UTF8 (SQUserPointer file)
static SQInteger _io_file_read (SQUserPointer file, SQUserPointer buf, SQInteger size)

Variables

ScriptAllocator_squirrel_allocator = nullptr

Detailed Description

the implementation of the Squirrel class.

It handles all Squirrel-stuff and gives a nice API back to work with.

Definition in file squirrel.cpp.

Function Documentation

◆ _io_file_lexfeed_ASCII()

char32_t _io_file_lexfeed_ASCII ( SQUserPointer file)
static

Definition at line 623 of file squirrel.cpp.

◆ _io_file_lexfeed_UTF8()

char32_t _io_file_lexfeed_UTF8 ( SQUserPointer file)
static

Definition at line 629 of file squirrel.cpp.

◆ _io_file_read()

SQInteger _io_file_read ( SQUserPointer file,
SQUserPointer buf,
SQInteger size )
static

Definition at line 635 of file squirrel.cpp.

◆ sq_vm_free()

void sq_vm_free ( void * p,
SQUnsignedInteger size )

Definition at line 175 of file squirrel.cpp.

◆ sq_vm_malloc()

void * sq_vm_malloc ( SQUnsignedInteger size)

Definition at line 173 of file squirrel.cpp.

◆ sq_vm_realloc()

void * sq_vm_realloc ( void * p,
SQUnsignedInteger oldsize,
SQUnsignedInteger size )

Definition at line 174 of file squirrel.cpp.

Variable Documentation

◆ _squirrel_allocator

ScriptAllocator* _squirrel_allocator = nullptr

Definition at line 171 of file squirrel.cpp.