This is a different implementation of getlocalbase() than the one that has been reverted by Scott Long in SVN rev. r367711
Instead of a user provided buffer and calling conventions that require error checks, this version always returns a pointer to a valid string that is suitable as LOCALBASE path (but not validated).
Should this have the flavor-foo for the python version? Should this be done now or should the focus be only on fixing the build issue?