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

Add support for non-decorated export names in C-plugins #305

Closed
Reel-Deal opened this issue Nov 25, 2022 · 2 comments
Closed

Add support for non-decorated export names in C-plugins #305

Reel-Deal opened this issue Nov 25, 2022 · 2 comments

Comments

@Reel-Deal
Copy link
Member

Hi there pinterf, I hope all is going well with you. I'm sure you're enjoying life away from AviSynth :)

I was wondering if it’s not a big task, can support for non-decorated export names in C-plugins be added? Back in 2019 you asked if there would be any drawbacks, I don't think anyone said anything. I did ask ultim about it and he said it was mainly an oversight (see #6).

There's a C-plugin written in Delphi named Dering, I added it to the wiki like a year ago or so but I could never get it to work since it required some unknown Delphi dependency (USERLIB.BPL). gispos was kind enough to help and managed to compile the plugin so it did not need those obscure dependencies. We both tried the plugin on AviSynth+ and it said that the plugin could not be used. Out of curiosity I tried the plugin with AVS 2.6 and it worked there, so then I started searching for a possible cause. It turns out that plugin uses the "avisynth_c_plugin_init" export which is not compatible with 32-bit AVS+. Unfortunately, gispos said that "Delphi also cannot use @ in a designation" so using "_avisynth_c_plugin_init@4" was out of the question. Asd-g also has like 5 C-plugins that use "avisynth_c_plugin_init" and maybe another 10+ older plugins (that I know of). Not a big deal since I suspect the majority of AviSynth+ users are running x64.

@pinterf
Copy link

pinterf commented Nov 25, 2022

Yep, it would be easy. Current rules:

POSIX: avisynth_c_plugin_init
WIN64: avisynth_c_plugin_init, then _avisynth_c_plugin_init@4
WIN32: _avisynth_c_plugin_init@4 then avisynth_c_plugin_init@4

So in Win32 both valid options are decorated. I have to extend it with a third option then: avisynth_c_plugin_init.

(Haha, as you saw already, I visited doom9 again and have other hidden tasks in various plugins in progress, and I do enjoy working on Avisynth related tasks :) )

@Reel-Deal
Copy link
Member Author

Oh nice! I did not see you had already added support. That seems it was very easy.

I'll do my best to find a few more bugs to warrant a new test release :). Thanks pinterf.

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