File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -766,17 +766,19 @@ end
766766
767767# Wrap functions from the cpp module to the passed julia module
768768function wrap_functions (functions, julia_mod)
769- if ! isempty (julia_mod. __cxxwrap_pointers)
770- empty! (julia_mod. __cxxwrap_methodkeys)
771- empty! (julia_mod. __cxxwrap_pointers)
769+ cxxp = Base. invokelatest (getproperty, julia_mod, :__cxxwrap_pointers )
770+ cxxmk = Base. invokelatest (getproperty, julia_mod, :__cxxwrap_methodkeys )
771+ if ! isempty (cxxp)
772+ empty! (cxxmk)
773+ empty! (cxxp)
772774 end
773775 precompiling = true
774776
775777 for func in functions
776778 (mkey,fptrs) = _register_function_pointers (func, precompiling)
777- push! (julia_mod . __cxxwrap_methodkeys , mkey)
778- push! (julia_mod . __cxxwrap_pointers , fptrs)
779- funcidx = length (julia_mod . __cxxwrap_pointers )
779+ push! (cxxmk , mkey)
780+ push! (cxxp , fptrs)
781+ funcidx = length (cxxp )
780782
781783 Core. eval (julia_mod, build_function_expression (func, funcidx, julia_mod))
782784 end
You can’t perform that action at this time.
0 commit comments