RecompExternalPython for N64Recompiled 2.0.0
Loading...
Searching...
No Matches

Various helper functions, primarily used by API macros. More...

Topics

 REPY_IteratorHelper Methods
 Method functions to operate on REPY_IteratorHelper objects.
 REPY_IfStmtChain Methods
 Method functions to operate on REPY_IfStmtChain objects.
 REPY_IfStmtHelper Methods
 Method functions to operate on REPY_IfStmtHelper objects.
 REPY_DeferredCleanupHelper Methods
 Method functions to operate on REPY_DeferredCleanupHelper objects.

Functions

char * REPY_InlineCodeSourceStrHelper (char *category, char *filename, char *function_name, REPY_u32 line_number, char *identifier)
 Constructs the filename strings used by most macros that enable inlining Python code into C files.

Detailed Description

Various helper functions, primarily used by API macros.

You don't usually need to invoke these directly.

Function Documentation

◆ REPY_InlineCodeSourceStrHelper()

char * REPY_InlineCodeSourceStrHelper ( char * category,
char * filename,
char * function_name,
REPY_u32 line_number,
char * identifier )

Constructs the filename strings used by most macros that enable inlining Python code into C files.

The pointer returned by this function must be freed with recomp_free. Failure to do so will result in a memory leak.

Parameters
categoryA category prefix for the filename string. Usually the name of the invoking macro.
filenameA C filename to associate with a piece of Python code. Usually _FILE_NAME__.
function_nameThe name of C function to associate with a piece of Python code. Usually __func__.
line_numberA line number in a C file to associate with a piece of Python code. Usually __LINE__.
identifierAn identifiying string for a piece of Python code. Usually the bytecode identifier from the C file.
Returns
The constructed source name as a NULL-terminated C string.