mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-07 04:46:25 +00:00
register_schema: use ref to avoid segfaults
E.g. `register_schema(None)` from Python was resulting in a segfault
This commit is contained in:
@@ -510,7 +510,7 @@ class IFC_PARSE_API schema_registry {
|
||||
typedef void register_schema_plugin_fn(schema_registry&, const ifcopenshell::plugin::module&);
|
||||
|
||||
void bind(const std::string& schema_name, get_schema_fn get, clear_schema_fn clear, const ifcopenshell::plugin::module& module = ifcopenshell::plugin::module());
|
||||
void bind(schema_definition* schema);
|
||||
void bind(schema_definition& schema);
|
||||
const schema_definition* get(const std::string& schema_name);
|
||||
std::vector<std::string> names();
|
||||
void clear();
|
||||
@@ -548,7 +548,7 @@ IFC_PARSE_API const schema_definition* schema_by_name(const std::string& schema_
|
||||
|
||||
IFC_PARSE_API std::vector<std::string> schema_names();
|
||||
|
||||
IFC_PARSE_API void register_schema(schema_definition* schema);
|
||||
IFC_PARSE_API void register_schema(schema_definition& schema);
|
||||
|
||||
IFC_PARSE_API void clear_schemas();
|
||||
} // namespace ifcopenshell
|
||||
|
||||
Reference in New Issue
Block a user