Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ struct AVS_Linkage not harmonizing with C struct AVS_Library #334

Open
Enyium opened this issue Feb 3, 2023 · 1 comment
Open

C++ struct AVS_Linkage not harmonizing with C struct AVS_Library #334

Enyium opened this issue Feb 3, 2023 · 1 comment

Comments

@Enyium
Copy link

Enyium commented Feb 3, 2023

I didn't check everything. I just noticed that the C struct AVS_Library (avisynth_c.h) contains

  // V9
  AVSC_DECLARE_FUNC(avs_is_property_writable);
  AVSC_DECLARE_FUNC(avs_make_property_writable);

But the C++ struct AVS_Linkage (avisynth.h) only has

  // V9: VideoFrame helper
  bool          (VideoFrame::*IsPropertyWritable)() const;

and not MakePropertyWritable(). Doesn't this prevent calling this function?

And avs_..._property_writable() are in turn missing in the function list in avs_load_library(). Is avs_load_library() old, because avs_..._property_writable() are mentioned elsewhere in the header file? If so, can it be removed?

@pinterf: You said we must not forget to bump the interface version number. Is there also something regarding avisynth_c.h and the interface additions we must not forget?

@pinterf
Copy link

pinterf commented Feb 5, 2023

MakePropertyWritable is an IScriptEnvironment method, unlike IsPropertyWritable.
This is why only the latter appears in AVS_Linkage.

As far as I know, C plugins (there is not much I am aware of), don't use avs_load_library. They have their own loader into their own struct. avs_load_library is just a helper function with some convenience conversion of some functions which would be missed from the old Avisynth. Anyways, unlike avisynth.h, avisynth_c.h is usually edited or converted.

But yes, those two v9 entries are missing from AVSC_LOAD_FUNC, accidentally.

As for what must be arranged and ported for C interface, I'm gonna return to the topic later next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants