From f2230ed975249b8db00a47563dbf25b55b933515 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 17 Sep 2026 15:51:31 +1000 Subject: [PATCH] ifcparse: keep file::all_referencing_instances out of the Python wrapper SWIG wraps every public method of file, so the std::function-taking helper leaked into the wrapper and the stub validation tripped over it. Only the compiled %extend helpers call it. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01HNrXDmR88wKPCYwGE21SyH --- src/ifcparse/file.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcparse/file.h b/src/ifcparse/file.h index feed44a775..eb87d28315 100644 --- a/src/ifcparse/file.h +++ b/src/ifcparse/file.h @@ -350,9 +350,12 @@ public: /// Returns all entities in the file that reference the id std::vector instances_by_reference(int reference_id); +#ifndef SWIG /// Returns whether pred accepts the id of every instance that references - /// instance_id, stopping at the first one it rejects. + /// instance_id, stopping at the first one it rejects. Used by the Python + /// wrapper's helpers; a std::function can't be exposed to Python itself. bool all_referencing_instances(int instance_id, const std::function& pred); +#endif /// Returns the entity with the specified id express::base instance_by_id(int instance_id);