>Dynamic allocation is required for instantiation. That is, special
>host calls will be needed to replace the standard ones. Now, is the
>host supposed to do this by hiding malloc() etc from the plugin when
>it's loaded, or should we use functions with other names? (I'm still
>not convinced that loader tricks are the way to go.)

This is one of the reasons why I am a C++ fan. Consider how nice it is
to be able to say:

class Plugin {
      .     
      .
  protected:
      void *malloc ();
      .
      .
};

class MyPlugin : public Plugin {
      MyPlugin () { 
          foo = malloc (...);
      }
      .
      .

  private:         
      void *foo;
      .    
      .
};

Voila - if all plugins were derived from Plugin, we'd instantly have
control over all this stuff. 

Alas, I accept the need for a C API. Sigh.

--p








Reply via email to