mirror of
https://github.com/KLayout/klayout.git
synced 2026-08-30 01:39:30 +02:00
Fixed #33 (Plugin factory not working when using with Python)
The fix consisted of introducing "factory" type virtual methods which ensure that a reference is held to the returned object. This is important for implementing factory methods in Python. Without this, the object get destroyed before we have a chance to increment the reference count.
This commit is contained in:
@@ -509,7 +509,7 @@ Class<gsi::PluginFactoryBase> decl_PluginFactory ("PluginFactory",
|
||||
"@args root\n"
|
||||
"@param root The reference to the \\MainWindow object\n"
|
||||
) +
|
||||
callback ("create_plugin", &gsi::PluginFactoryBase::create_plugin_gsi, &gsi::PluginFactoryBase::f_create_plugin,
|
||||
factory_callback ("create_plugin", &gsi::PluginFactoryBase::create_plugin_gsi, &gsi::PluginFactoryBase::f_create_plugin,
|
||||
"@brief Creates the plugin\n"
|
||||
"This is the basic functionality that the factory must provide. This method must create a plugin of the "
|
||||
"specific type.\n"
|
||||
|
||||
Reference in New Issue
Block a user