Issue 19702 - Remove usage of DECLARE_HANDLE
Summary: Remove usage of DECLARE_HANDLE
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All Windows
: P4 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2019-02-26 18:57 UTC by Andre
Modified: 2024-01-14 22:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andre 2019-02-26 18:57:49 UTC
It seems the usage of template

package template DECLARE_HANDLE(string name, base = HANDLE) {
    mixin ("alias " ~ base.stringof ~ " " ~ name ~ ";");

in druntime is superfluous but causes headaches for IDEs like IntelliJ as it cannot find the source of e.g. SC_HANDLE
which is defined as

mixin DECLARE_HANDLE!("SC_HANDLE");

As far as I understand the template can be removed and the handles can
be defined as e.g.

alias HANDLE SC_HANDLE;

See also 
https://forum.dlang.org/post/jqifbzadmpzxqxhzfsyl@forum.dlang.org
Comment 1 Dlang Bot 2024-01-14 21:13:02 UTC
@vabenil created dlang/dmd pull request #16038 "Fix issue 19702 - Remove usage of DECLARE_HANDLE" fixing this issue:

- Fix issue 19702 - Remove usage of DECLARE_HANDLE
  
  Replace DECLARE_HANDLE in favor of aliases to avoid weird compilation
  issues.

https://github.com/dlang/dmd/pull/16038
Comment 2 Dlang Bot 2024-01-14 22:17:59 UTC
dlang/dmd pull request #16038 "Fix issue 19702 - Remove usage of DECLARE_HANDLE" was merged into master:

- 85cc0cad7920f3f93dd83a9a9ff47484d617a7b9 by vabenil:
  Fix issue 19702 - Remove usage of DECLARE_HANDLE
  
  Replace DECLARE_HANDLE in favor of aliases to avoid weird compilation
  issues.

https://github.com/dlang/dmd/pull/16038