<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 07/12/2012 13:34, Jonas Maebe wrote:<br>
</div>
<blockquote
cite="mid:DA5F31B2-4FFA-492A-9F96-7889875D3A96@elis.ugent.be"
type="cite"><br>
<div>
<div>On 06 Dec 2012, at 22:45, Martin wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><span class="Apple-style-span"
style="border-collapse: separate; color: rgb(0, 0, 0);
font-family: Monaco; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px;
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
-webkit-text-decorations-in-effect: none;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width:
0px; font-size: medium; "><span class="Apple-style-span"
style="font-family: monospace; ">I am currently fixing
some of the PascalScript issues. When working with
strings, it sometimes needs to inc/dec the refcount (or
access the length)<br>
<br>
Current code does calculate the position of that data as
either 1 or 2 times sizeof(Pointer) in front of the actual
data. (Not guaranteed for the future, but currently it is
there)<br>
</span></span></blockquote>
<div><br>
</div>
<div>Not in svn trunk.<br>
</div>
</div>
</blockquote>
Actually strings are done without hacking. typecasting the pointer,
and have fpc deal with it.<br>
<br>
Have arrays also changed?<br>
<br>
The problem are arrays. Arrays may be of a type, that is not even
declared in the running app. Because in pascal script, the script
can define its own type. Then the scripts runtime, must be able to
finalize it. <br>
Well if it is never given to the compiled code, then layout does not
matter.<br>
<br>
But if a compiled function "Procedure Foo(a: Array of TPoint)" is
used from the script, then the type must be declared for the script
too. And then script and and exe must be able to deal with this
data.<br>
<br>
But the script engine currently has no access to a low level
finalize/initialize/incref/decref/... for that specific data type.<br>
<br>
Yes it be nice to get a real solution for that. But I also need to
find a solution that works now.<br>
<br>
<br>
</body>
</html>