mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
Property transfer ownership of schema from py to c++ upon register_schema()
This commit is contained in:
@@ -160,9 +160,6 @@ def create_entity(type, schema="IFC4", *args, **kwargs):
|
|||||||
return e
|
return e
|
||||||
|
|
||||||
|
|
||||||
gcroot = []
|
|
||||||
|
|
||||||
|
|
||||||
def register_schema(schema):
|
def register_schema(schema):
|
||||||
"""Registers a custom IFC schema
|
"""Registers a custom IFC schema
|
||||||
|
|
||||||
@@ -177,7 +174,8 @@ def register_schema(schema):
|
|||||||
ifcopenshell.register_schema(schema)
|
ifcopenshell.register_schema(schema)
|
||||||
ifcopenshell.file(schema="IFC_CUSTOM")
|
ifcopenshell.file(schema="IFC_CUSTOM")
|
||||||
"""
|
"""
|
||||||
gcroot.append(schema)
|
schema.schema.this.disown()
|
||||||
|
schema.disown()
|
||||||
ifcopenshell_wrapper.register_schema(schema.schema)
|
ifcopenshell_wrapper.register_schema(schema.schema)
|
||||||
register_schema_attributes(schema.schema)
|
register_schema_attributes(schema.schema)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user