[OpenSmalltalk/opensmalltalk-vm] b7c939: Fix the circular dependency between sqMemoryAccess...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] b7c939: Fix the circular dependency between sqMemoryAccess...

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: b7c93957e773a6f1e90f77972d8a3255e78a2698
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b7c93957e773a6f1e90f77972d8a3255e78a2698
  Author: Eliot Miranda <[hidden email]>
  Date:   2021-02-12 (Fri, 12 Feb 2021)

  Changed paths:
    M platforms/Cross/vm/sqMemoryAccess.h
    M platforms/Mac OS/vm/sqPlatformSpecific.h
    M platforms/iOS/vm/OSX/sqPlatformSpecific.h
    M platforms/iOS/vm/iPhone/sqPlatformSpecific.h
    M platforms/unix/vm/sqPlatformSpecific.h

  Log Message:
  -----------
  Fix the circular dependency between sqMemoryAccess.h and sqPlatformSpecific.h
which derives from sqPlatformSpecific.h trying to do two different things.
First sqPlatformSpecific.h provides platform implementations of prerequisites
such as the EXPORT macros.  Second sqPlatformSpecific.h defines platform
specific support functions which need types declared by sqMemoryAccess.h.
But sqMemoryAccess.h needs those platform implementations prerequisites first.
So have sqMemoryAccess.h include sqPlatformSpecific.h a second time if it
detects that sqPlatformSpecific.h has already been included, and have
sqPlatformSpecific.h only declare the support funcitons if it detects that
sqMemoryAccess.h has been included.

A better solution would be to cleanly separate the two functions of
sqPlatformSpecific.h but this is too much work in teh short term.