Hmm, I'm surprised if expandweights4 still compiles.  I don't have your source tree checked out on this machine, so I can't easily check myself right now.  Are you sure you rebuilt apitest after making this change?

I'm suggesting we change the method as you have above, but we also add an overload for it with the old signature, which we mark using XAPIAN_DEPRECATED (so code which uses it will compile but give a warning that it's using a deprecated API feature).  This compatibility method should actually work, or else we're silently breaking existing code which uses it i.e. it should probably take expand_k and call `set_expansion_scheme("trad", expand_k)`.