resonance 1.0.1
Loading...
Searching...
No Matches
Py::ExtensionModuleBase Class Reference

Base of an extension module the binding registers with the interpreter. More...

#include <extensionmodulebase.h>

Collaboration diagram for Py::ExtensionModuleBase:

Public Member Functions

 ExtensionModuleBase (const char *pszName)
 Record the module name and start an empty method table.
virtual ~ExtensionModuleBase ()
 Release the method table and the name.

Protected Member Functions

void initialize (const char *pszModuleDoc)
 Register the module with the interpreter.

Protected Attributes

const HxStr mModuleName
 The module name.
MethodTable mMethodTable
 The methods to register.

Detailed Description

Base of an extension module the binding registers with the interpreter.

Its RTTI descriptor is at 0x0086f650. It has no base. Its accessor is at 0x005aba10.

The object is 0x20 bytes, the module name at +0x00, the method table at +0x08, and the vptr after both at +0x1c. The vtable at 0x008331f8 has two entries, the type function and the destructor. Released PyCXX also stores the qualified module name and declares the method invokers as pure virtual members, and neither is present in the image.

The game does not use the class for its hx module, because InitHxModule() at 0x005597b8 drives Py_InitModule4() directly from a Py::MethodTable rather than through a module object. No routine of the image constructs one.

Constructor & Destructor Documentation

◆ ExtensionModuleBase()

Py::ExtensionModuleBase::ExtensionModuleBase ( const char * pszName)
explicit

Record the module name and start an empty method table.

Parameters
pszNameThe module name.
Ghidra address:
NTSC-U/C: 0x005a5d28
Ghidra address:
PAL: 0x005e8218

◆ ~ExtensionModuleBase()

virtual Py::ExtensionModuleBase::~ExtensionModuleBase ( )
virtual

Release the method table and the name.

Ghidra address:
NTSC-U/C: 0x005a5d98
Ghidra address:
PAL: 0x005e8298

Member Function Documentation

◆ initialize()

void Py::ExtensionModuleBase::initialize ( const char * pszModuleDoc)
protected

Register the module with the interpreter.

The module's self is a new Py::ExtensionModuleBasePtr pointing back at this object.

Parameters
pszModuleDocThe module doc string.
Ghidra address:
NTSC-U/C: 0x005a5ea0
Ghidra address:
PAL: 0x005e83b0

Member Data Documentation

◆ mModuleName

const HxStr Py::ExtensionModuleBase::mModuleName
protected

The module name.

◆ mMethodTable

MethodTable Py::ExtensionModuleBase::mMethodTable
protected

The methods to register.


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