<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>We've just fixed that in the "master" branch.</p>
<p>Cheers<br>
Maurizio<br>
</p>
<div class="moz-cite-prefix">On 15/02/2024 15:11, Maurizio
Cimadamore wrote:<br>
</div>
<blockquote type="cite" cite="mid:5e0bd0e4-512c-45d1-8dbe-c73a4e5ab23d@oracle.com">
<p>I see - thanks a lot.</p>
<p>There's two issues here:<br>
</p>
<p>* since we switched the translation of function pointers from
interface to class + interface, when a function pointer code is
embedded inside a struct, we lack the required "static"<br>
* the new function pointer class lacks a package constructor
(which we have in other classes)</p>
<p>I'll fix that</p>
<p>Maurizio<br>
</p>
<div class="moz-cite-prefix">On 15/02/2024 14:31, Duncan Gittins
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CABOqcFuGFt8zNYE5yqMaMaEUgQzdWaSfjZkt+Zp6tBfpx56QXQ@mail.gmail.com">
<div dir="ltr">
<div>Two examples attached. This compiles: " new
LPHANDLER_FUNCTION_EX();" whereas "new IUnknownVtbl().new
QueryInterface();" does not because the IUnknownVtbl
constructor is generated.<br>
</div>
<div><br>
</div>
<div>
<div> Note that a compiler warning is only issued because
after I generate 5 packages with jextract, I build them
with a module-info.java <br>
</div>
</div>
<div><br>
</div>
<div>/**<br>
* Module definition for JEXTRACT based generated code<br>
*/<br>
module jextract.duncan.win<br>
{<br>
//
=======================================================================<br>
// Exports:<br>
exports duncan.win.advapi;<br>
exports duncan.win.kernel;<br>
exports duncan.win.ole;<br>
exports duncan.win.shell;<br>
exports duncan.win.user;<br>
<br>
//
=======================================================================<br>
}</div>
<div><br>
</div>
<div>Kind regards</div>
<div><br>
</div>
<div>Duncan<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, 15 Feb 2024 at
13:38, Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">maurizio.cimadamore@oracle.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Can you please send one of the source file that is
generating these warnings?</p>
<p>Thanks<br>
Maurizio<br>
</p>
<div>On 15/02/2024 12:23, Duncan Gittins wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>These are trivial issues I noted when re-building
with latest jextract master (am now using LLVM13).</div>
<div><br>
</div>
<div>I put all my generated code into a module
definition which exports each package generated by
jextract. The compiler warns that there are no
explicit contructors for each interface class type,
such as the inner or top level interface handlers
such as IUnknownVtbl.QueryInterface and
LPHANDLER_FUNCTION_EX:</div>
<div><br>
</div>
<div> [javac]
C:\mymoduleproject\generated\some\package\name\IUnknownVtbl.java:48:
warning: [missing-explicit-ctor] class
IUnknownVtbl.QueryInterface in exported package <a href="https://urldefense.com/v3/__http://some.package.name__;!!ACWV5N9M2RV99hQ!JWktJzjV6IXxP1Ztow5Nu8IBHQPBuqRlPe4zP_q2D4bzIgbdQkTuin4byR10rLXhj_RPM78NZuOQgc-EX_lmerZVQ45-ve34$" target="_blank" moz-do-not-send="true">some.package.name</a>
declares no explicit constructors, thereby exposing
a default constructor to clients of module
mymoduleproject<br>
[javac] public class QueryInterface {</div>
<br>
<div>Also, shouldn't the inner classes for interfaces
- like IUnknownVtbl.QueryInterface - be declared as
static? I assume that means the code generated could
be a tiny amount smaller as no implicit parent$this.<br>
</div>
<div><br>
</div>
<div>Headers used: #include <objbase.h> +
#include <shlobj_core.h><br>
</div>
<div><br>
</div>
<div>Kind regards</div>
<div><br>
</div>
<div>Duncan<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
</blockquote>
</body>
</html>