mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 14:47:55 +02:00
Changed the interface creation to keep the generic name of an interface.
This commit is contained in:
parent
dbbb91705f
commit
2bf377744a
8
utils/pas2js/dist/rtl.js
vendored
8
utils/pas2js/dist/rtl.js
vendored
@ -554,20 +554,20 @@ var rtl = {
|
||||
rtl.raiseE("EInvalidCast");
|
||||
},
|
||||
|
||||
createInterface: function(module, name, guid, fnnames, ancestor, initfn){
|
||||
createInterface: function(module, name, guid, fnnames, ancestor, initfn, rttiname){
|
||||
//console.log('createInterface name="'+name+'" guid="'+guid+'" names='+fnnames);
|
||||
var i = ancestor?Object.create(ancestor):{};
|
||||
module[name] = i;
|
||||
i.$module = module;
|
||||
i.$name = name;
|
||||
i.$fullname = module.$name+'.'+name;
|
||||
i.$name = rttiname?rttiname:name;
|
||||
i.$fullname = module.$name+'.'+i.$name;
|
||||
i.$guid = guid;
|
||||
i.$guidr = null;
|
||||
i.$names = fnnames?fnnames:[];
|
||||
if (rtl.isFunction(initfn)){
|
||||
// rtti
|
||||
if (rtl.debug_rtti) rtl.debug('createInterface '+i.$fullname);
|
||||
var t = i.$module.$rtti.$Interface(name,{ "interface": i, module: module });
|
||||
var t = i.$module.$rtti.$Interface(i.$name,{ "interface": i, module: module });
|
||||
i.$rtti = t;
|
||||
if (ancestor) t.ancestor = ancestor.$rtti;
|
||||
if (!t.ancestor) t.ancestor = null;
|
||||
|
Loading…
Reference in New Issue
Block a user